Seven GNUWorld Website Setup on Ubuntu 20.04
Posted: Mon Feb 07, 2022 5:29 pm
Hello,
Bellow you can find all the steps needed to be done in order to build thr CService (X) WebPage using Ubuntu linux server 20.04 and PHP7.4 version.
INFO !!! CService (X) Website is supported until latest PHP7.4 version.
Please keep in mind that the IP Address of the machine used for this HOWTO is 192.168.1.122 and it should be changed with the IP address of the machine where you want to have the webpage installed.
OK, now let`s proceed....
1. First we ensure that we have everything installed :
php7.4, apache2 Server, Postgresql, composer
2. Now we proceed with installing composer as root:
3. Install Postgresql 15.2: - Skip this step if you already have PGSQL SETUP and RUNNING.
Now start postgresql Server...
4 .We get the webpage source code from UniversalNet Official GitHub under user gnuworld:
Bellow you can find all the steps needed to be done in order to build thr CService (X) WebPage using Ubuntu linux server 20.04 and PHP7.4 version.
INFO !!! CService (X) Website is supported until latest PHP7.4 version.
Please keep in mind that the IP Address of the machine used for this HOWTO is 192.168.1.122 and it should be changed with the IP address of the machine where you want to have the webpage installed.
OK, now let`s proceed....
1. First we ensure that we have everything installed :
php7.4, apache2 Server, Postgresql, composer
- apt install build-essential
- apt install net-tools
- apt install apache2 apache2-bin apache2-data apache2-dev apache2-doc apache2-ssl-dev apache2-utils libapache2-mod-php php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-curl php7.4-dev php7.4-gd php7.4-json php7.4-mysql php7.4-pgsql php7.4-readline php7.4-sqlite3 php7.4-xml php7.4-xmlrpc git flex bison libreadline-dev libssl-dev mlocate openssl zlib1g zlib1g-dev
- updatedb
- Open pico /etc/php/7.4/apache2/php.ini file and change value "short_open_tag = Off" in "short_open_tag = On"
- /etc/init.d/apache2 restart
2. Now we proceed with installing composer as root:
- curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
3. Install Postgresql 15.2: - Skip this step if you already have PGSQL SETUP and RUNNING.
- wget https://coder-com.universalnet.org/packages/postgresql-15.2.tar.gz
- tar zxvf postgresql-15.2.tar.gz
- cd postgresql-15.2
- ./configure
- make
- make install
- mkdir /usr/local/pgsql/data
- adduser gnuworld
- chown gnuworld /usr/local/pgsql/data/
- su - gnuworld
- /usr/local/pgsql/bin/initdb -A trust -E=SQL_ASCII /usr/local/pgsql/data/
- pico /usr/local/pgsql/data/pg_hba.conf
- host all all X_machine_ip_here/32 trust
- host all all WebSite_machine_ip_here/32 trust
Now start postgresql Server...
- /usr/local/pgsql/bin/postmaster -B 64 -N 32 -i -D /usr/local/pgsql/data -F -h 192.168.1.122 >/dev/null 2>&1 &
4 .We get the webpage source code from UniversalNet Official GitHub under user gnuworld:
- su - gnuworld
- git clone https://github.com/ZioNeL/cservice-web/
- cd cservice-web/
- composer install
- cd php_includes/
- cp config.inc.dist config.inc
- cp cmaster.inc.dist cmaster.inc
- cp blackhole.inc.dist blackhole.inc
- su - gnuworld
- cd gnuworld-enhanced/doc/list]
- /usr/local/pgsql/bin/createdb local_db
- /usr/local/pgsql/bin/psql local_db < local_db.sql
- cd /var/www/html/
- chmod 711 ~gnuworld
- chmod 711 ~gnuworld/cservice-web
- chmod 755 ~gnuworld/cservice-web/php_includes
- chmod 644 ~gnuworld/cservice-web/php_includes/config.inc
- chmod 755 ~gnuworld/cservice-web/docs/gnuworld/
- ln -s /home/gnuworld/cservice-web/docs/gnuworld live
6. TThere are two options to solve (IPR) restriction, bellow you can find how to on both.- su - gnuworld
- pico ipr.sql
- insert into ip_restrict (id, user_id, added_by, added, type, expiry, value) values (1, 1, 1, now()::abstime::int4, 1, 0, ‘192.168.1.122’);
- /usr/local/pgsql/bin/psql -h 192.168.1.122 cservice < ipr.sql
6.2 - Fix (IPR) by disableing IPR option in config.inc file- su - gnuworld
- cd gnuworld
- pico cservice_web/php_includes/config.inc
- change define("IPR_REQUIRED",1); to define("IPR_REQUIRED",0);
7 In order to permit login on CService Web from local IP address like 192.168.xx.xx or 10.0.0.xx the following changes must be made:
nano /home/gnuworld/cservice-web/php_includes/config.inc
# Replace define("DISALLOW_RESERVED_BLOCKS",1); to define("DISALLOW_RESERVED_BLOCKS",0);
Now login using * accounts from local IP address is possible.
This HOWTO was last updated by ZioN
07 Feb 2022