GNUWorld Website Setup on Debian 10
Posted: Sun Feb 21, 2021 6:22 pm
Hello,
Bellow you can find all the steps needed to be done in order to build thr CService (X) WebPage using Debian linux server.
Please keep in mind that the IP Address of the machine used for this HOWTO is 192.168.1.133 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.0, apache2 Server, Postgresql, Curl, composer
We save and restart the apache2 service.
2. Now we proceed with installing composer as root:
Now start postgresql Server...
6.2 - Fix (IPR) by disableing IPR option in config.inc file
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
21 Feb 2021
Bellow you can find all the steps needed to be done in order to build thr CService (X) WebPage using Debian linux server.
Please keep in mind that the IP Address of the machine used for this HOWTO is 192.168.1.133 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.0, apache2 Server, Postgresql, Curl, composer
- apt install build-essential
- apt install wget git
- apt install openssl
- apt install libssl
- apt install libssl-dev
- apt install -y gnupg2 ca-certificates apt-transport-https software-properties-common
- wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -
- echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list
- apt update
- apt list --upgradable
- apt update -y
- apt upgrade -y
- apt-get install bison libreadline-dev zlib1g-dev automake make flex mlocate apache2 apache2-bin apache2-data apache2-dev apache2-doc apache2-ssl-dev apache2-utils libapache2-mod-php8.2 php8.2 php8.2-dev php8.2-readline php8.2-gd php8.2-xml php8.2-pgsql php8.2-json php8.2-mbstring php8.2-gmp php8.2-zip php8.2-sqlite3 php8.2-bcmath curl liboath-dev liboath0
- updatedb
- locate php.ini
We save and restart the apache2 service.
2. Now we proceed with installing composer as root:
- 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
- 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.133 >/dev/null 2>&1 &
- 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
- cp blackhole.inc.dist blackhole.inc
- 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
- 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.133’);
- /usr/local/pgsql/bin/psql -h 192.168.1.133 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
21 Feb 2021