GNUWorld Website Setup on Centos 8.4.2105
Posted: Wed Jun 23, 2021 9:43 am
Hello,
Bellow you can find all the steps needed to be done in order to build thr CService (X) WebPage using Centos 7 linux server and PHP7.x versions.
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.119 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 Now we need to make sure that the server is update - to - date:
# Check if httpd Server is started:
#If is not started use the following command:
# Set httpd server to start on server reboot
Locate php.ini file and change some values:
5. Now we need to install Composer.
Now start postgresql Server...
8. Now to create the live shortcut for the webpage:
9. There are two options to solve (IPR) restriction, bellow you can find how to on both.
9.1 - Fix (IPR) by inserting your ip into Admin account direct on database cservice.
9.2 - Fix (IPR) by disableing IPR option in config.inc file
Save the file and close
10 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.
Now you should have a running CService (X) Website using PHP7.x .
Have fun !!!
This HOWTO was last updated by ZioN
23 Jun 2021
Bellow you can find all the steps needed to be done in order to build thr CService (X) WebPage using Centos 7 linux server and PHP7.x versions.
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.119 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 Now we need to make sure that the server is update - to - date:
- yum update
- yum install curl git make automake autoconf cpp gcc gcc-c++ bison readline readline-devel flex byacc zip unzip nano mlocate wget
- yum install httpd.x86_64 httpd-devel.x86_64 httpd-tools.x86_64 mod_ssl.x86_64 openssl.x86_64 openssl-devel.x86_64 php php-cli php-gd php-xml php-soap php-xmlrpc php-mbstring php-json php-pgsql php-devel
- semanage permissive -a httpd_t
- firewall-cmd --permanent --add-port=80/tcp
- firewall-cmd --permanent --add-port=443/tcp
- firewall-cmd --permanent --add-port=5432/tcp
- firewall-cmd --reload
# Check if httpd Server is started:
- service httpd status
#If is not started use the following command:
- service httpd start
# Set httpd server to start on server reboot
- systemctl enable httpd.service
Locate php.ini file and change some values:
- updatedb
- locate php.ini
- Open php.ini file and change value "short_open_tag = Off" in "short_open_tag = On"
- service httpd restart
- service httpd reload
5. Now we need to install Composer.
- curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
- wget https://coder-com.universalnet.org/packages/postgresql-15.2.tar.gz
- tar zxvf postgresql-15.2.tar.gz
- cd postgresql-15.2
- ./configure
- gmake
- 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.119 >/dev/null 2>&1 & # replace 192.168.1.119 with the IP PGSQL instance is running !!!
- su - gnuworld
- git clone https://github.com/UndernetIRC/cservice-web
- cd cservice-web/
- composer install
- cd php_includes/
- cp config.inc.dist config.inc #edit the file with your own values
- cp cmaster.inc.dist cmaster.inc #replace all 'localhost' content with the ip PGSQL instance is running !!!
- cp blackhole.inc.dist blackhole.inc
8. Now to create the live shortcut for the webpage:
- 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
9. There are two options to solve (IPR) restriction, bellow you can find how to on both.
- su - gnuworld
9.1 - Fix (IPR) by inserting your ip into Admin account direct on database cservice.
- 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.119’);
- /usr/local/pgsql/bin/psql -h 192.168.1.119 cservice < ipr.sql
9.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);
Save the file and close
10 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.
Now you should have a running CService (X) Website using PHP7.x .
Have fun !!!
This HOWTO was last updated by ZioN
23 Jun 2021