GNUWorld (X and UWorld)Modules Setup On Centos 6.x
Posted: Sat Apr 25, 2020 8:18 pm
Hello,
Bellow you can find all the steps needed to be done in order to build the GNWuorld (X and UWorld) Modules using a 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 gnuworld installed.
OK, now let`s proceed....
1. We need to make sure that the server is update - to - date:
2. Install Postgresql 11.10: - Skip this step if you already have PGSQL SETUP and RUNNING.
Now start postgresql Server...
3 . Download and build GNUWorld (X and UWorld) modules
4. Now Let`s build the databases !!!
## run the following commands under user gnuworld !!!
4.1 ## Building cservice database !!!
4.2 ## Building ccontrol (UWorld) database !!!
Skip this step ONLY if you already done it when you set the webpage !!!
5.3 ## Building local_db (Website) database !!!
5. GNUWorld config files needed to be edited before running gnuworld.
5.1 ## edit cservice.conf with your needed settings for your network.
5.2 ## edit ccontrol.conf with your needed settings for your network.
5.3 ## edit GNUWorld.conf with your needed settings for your network. Enable modules ccservice and ccontrol:
6. Starting GNUWorld
## If GNUWorld.conf , cservice.conf and ccontrol.conf files are set please proceed with starting GNUWorld, if NOT, please go back to step 6.
## to start gnuworld type te following command:
7. X- AUTHENTICATION FAILED as admin (IPR)
Enjoy.
8. Fix for register channel via IRC
open gnuworld/mode.cservice/sqlChannel.cc
Find:
15 Apr 2020
Bellow you can find all the steps needed to be done in order to build the GNWuorld (X and UWorld) Modules using a 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 gnuworld installed.
OK, now let`s proceed....
1. 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 zlib.x86_64 zlib-devel.x86_64 xmlsec1.x86_64 xmlsec1-devel.x86_64 xmlsec1-gcrypt.x86_64 xmlsec1-gcrypt-devel.x86_64 libtool-ltdl.x86_64 libtool-ltdl-devel.x86_64 libcxx.x86_64
- wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
- yum install devtoolset-2-gcc devtoolset-2-binutils.x86_64 devtoolset-2-binutils-devel.x86_64
- yum install devtoolset-2-gcc-c++.x86_64 devtoolset-2-libstdc++-devel.x86_64
- scl enable devtoolset-2 bash
- source /opt/rh/devtoolset-2/enable
- export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc
- export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
- export CXX=/opt/rh/devtoolset-2/root/usr/bin/c++
- updatedb
- ldconfig
- nano .bash_profile
- echo "WARNING: devtoolset-2 is enabled!"
- . /opt/rh/devtoolset-2/enable
2. Install Postgresql 11.10: - Skip this step if you already have PGSQL SETUP and RUNNING.
- wget https://coder-com.universalnet.org/packages/postgresql-11.10.tar.gz
- tar zxvf postgresql-11.10.tar.gz
- cd postgresql-11.10
- ./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 -o -F -h 192.168.1.133 >/dev/null 2>&1 &
- cd /etc/ld.so.conf.d/
- nano pgsql.conf
- /usr/local/pgsql/lib
- ldconfig
3 . Download and build GNUWorld (X and UWorld) modules
- su - gnuworld
- git clone https://github.com/UndernetIRC/gnuworld
- cd gnuworld
- ./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config --enable-modules=ccontrol,cservice
- make
- make install
4. Now Let`s build the databases !!!
## run the following commands under user gnuworld !!!
- cd gnuworld/doc
4.1 ## Building cservice database !!!
- /usr/local/pgsql/bin/createdb cservice
- /usr/local/pgsql/bin/psql cservice < cservice.sql
- /usr/local/pgsql/bin/psql cservice < languages.sql
- /usr/local/pgsql/bin/psql cservice < language_table.sql
- /usr/local/pgsql/bin/psql cservice < cservice.help.sql
- /usr/local/pgsql/bin/psql cservice < cservice.web.sql
- /usr/local/pgsql/bin/psql cservice < cservice.config.sql
- /usr/local/pgsql/bin/psql cservice < greeting.sql
- /usr/local/pgsql/bin/psql cservice < cservice.addme.sql
4.2 ## Building ccontrol (UWorld) database !!!
- /usr/local/pgsql/bin/createdb ccontrol
- /usr/local/pgsql/bin/psql ccontrol < ccontrol.sql
- /usr/local/pgsql/bin/psql ccontrol < ccontrol.help.sql
- /usr/local/pgsql/bin/psql ccontrol < ccontrol.shells.sql
- nano ccontrol.addme_sql
- replace "Admin" with your desired username (ex. ZioN)
- /usr/local/pgsql/bin/psql ccontrol < ccontrol.addme.sql
- /usr/local/pgsql/bin/psql ccontrol < ccontrol.commands.sql
Skip this step ONLY if you already done it when you set the webpage !!!
5.3 ## Building local_db (Website) database !!!
- /usr/local/pgsql/bin/createdb local_db
- /usr/local/pgsql/bin/psql local_db < local_db.sql
5. GNUWorld config files needed to be edited before running gnuworld.
- cd gnuworld/bin
5.1 ## edit cservice.conf with your needed settings for your network.
- cp cservice.example.conf cservice.conf
- nano cservice.conf
5.2 ## edit ccontrol.conf with your needed settings for your network.
- cp ccontrol.example.conf ccontrol.conf
- nano ccontrol.conf
5.3 ## edit GNUWorld.conf with your needed settings for your network. Enable modules ccservice and ccontrol:
- cp GNUWorld.example.conf GNUWorld.conf
- nano GNUWorld.conf
6. Starting GNUWorld
## If GNUWorld.conf , cservice.conf and ccontrol.conf files are set please proceed with starting GNUWorld, if NOT, please go back to step 6.
## to start gnuworld type te following command:
- ./gnuworld
7. X- AUTHENTICATION FAILED as admin (IPR)
- 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
Enjoy.
8. Fix for register channel via IRC
open gnuworld/mode.cservice/sqlChannel.cc
Find:
- static const char* queryHeader = "INSERT INTO channels (name, flags, registered_ts, channel_ts, channel_mode, last_updated, no_take) VALUES (";
stringstream queryString;
queryString << queryHeader
<< "'" << escapeSQLChars(name) << "', "
<< flags << ", "
<< registered_ts << ", "
<< channel_ts << ", '"
<< escapeSQLChars(channel_mode) << "', "
<< "now()::abstime::int4),"
<< no_take
<< ")"
<< ends;
- static const char* queryHeader = "INSERT INTO channels (name,flags,registered_ts,channel_ts,channel_mode,no_take,last_updated) VALUES (";
stringstream queryString;
queryString << queryHeader
<< "'" << escapeSQLChars(name) << "', "
<< flags << ", "
<< registered_ts << ", "
<< channel_ts << ", '"
<< escapeSQLChars(channel_mode) << "', "
<< no_take << ", "
<< "now()::abstime::int4)"
<< ends;
15 Apr 2020