Pre izvesnog vremena do „tastature“ i „miša“ mi dopadne Eununetov grid server sa preinstaliranim CentOs-om.
I sve bi bilo u redu da nisam dobio veoma štur, pomalo zbunjujuć mail, otprilike sledeće sadržine:
root access: qqqqqqqq
> primer komande: ssh -l root 94.127.x.xx
>
> user access
> user: admin
> pass: tamoneki
> hostname: host.gridsrv.net
Moram da pohvalim podršku na ažurnosti u odgovaranju na poruke, ali mi se ne dopada što su, ako ne grešim, samo dva inžinjera zadužena za grid server. Naravno njihovo radno vreme i moje slobodno vreme se nikao nije podudaralo.
Takođe nisam znao tačno šta je i kako instalirano.
S obzirom da mi je bio potreban server za postavljanje wordpress-a uradio sam sledeće: GOOGLE!
Odabrani tutorijal http://www.howtoforge.com/perfect-server-centos-5.5-x86_64-ispconfig-3
S obzirom da sam već imao prekonfigurisan server, počeo sam od treće stranice tutoriala. Naveo sam samo ono što sam instalirao, bez delova koje sam preskočio jer mi u trenutku nisu bili neophodni.
First we import the GPG keys for software packages:
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*
Enable the contrib and centosplus repositories:
vi /etc/yum.repos.d/CentOS-Base.repo
Edit the lines below:
[base]
[...]
exclude=postfix
[...]
[update]
[...]
exclude=postfix
[...]
[centosplus]
[...]
enabled=1
includepkgs=postfix
[...]
[contrib]
[...]
enabled=1
[...]
|
Then we update our existing packages on the system:
yum update
Now we install some software packages that are needed later on:
yum groupinstall ‘Development Tools’
yum groupinstall ‘Development Libraries’
Install Apache, MySQL, phpMyAdmin
First we enable the RPMforge repository on our CentOS system as lots of the packages that we are going to install in the course of this tutorial are not available in the official CentOS 5.5 repositories:
rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
cd /tmp
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
(If the above link doesn’t work anymore, you can find the current version of rpmforge-release here: http://packages.sw.be/rpmforge-release/)
Afterwards we can install the needed packages with one single command:
yum install ntp httpd mysql-server php php-mysql php-mbstring php-mcrypt phpmyadmin
Install Postfix With MySQL Support
The „normal“ Postfix package from the CentOS repository doesn’t have MySQL, but the Postfix package from the CentOS Plus repository does. Therefore we remove Postfix…
yum remove postfix
… and install it again, this time from the CentOS Plus repository:
yum install postfix
Then turn off Sendmail and start Postfix and MySQL:
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
chkconfig –levels 235 sendmail off
chkconfig –levels 235 postfix on
/etc/init.d/sendmail stop
/etc/init.d/postfix start
Set MySQL Passwords And Configure phpMyAdmin
Set passwords for the MySQL root account:
mysql_secure_installation
[root@server1 tmp]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] <– ENTER
New password: <– yourrootsqlpassword
Re-enter new password: <– yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] <– ENTER
… Success!
Normally, root should only be allowed to connect from ’localhost’. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] <– ENTER
… Success!
By default, MySQL comes with a database named ’test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] <– ENTER
- Dropping test database…
… Success!
- Removing privileges on test database…
… Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] <– ENTER
… Success!
Cleaning up…
All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
[root@server1 tmp]#
Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory „/usr/share/phpmyadmin“> stanza):
vi /etc/httpd/conf.d/phpmyadmin.conf
#
# Web application to manage MySQL
#
#<Directory "/usr/share/phpmyadmin">
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
|
Next we change the authentication in phpMyAdmin from cookie to http:
vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
|
Then we create the system startup links for Apache and start it:
chkconfig –levels 235 httpd on
/etc/init.d/httpd start
Installing Apache2 With mod_php, mod_fcgi/PHP5, And suPHP
ISPConfig 3 allows you to use mod_php, mod_fcgi/PHP5, cgi/PHP5, and suPHP on a per website basis.
mod_fcgid is not available in the official CentOS repositories, but there’s a package for CentOS 5.x in the centos.karan.org testing repository. We enable the repository as follows:
cd /etc/yum.repos.d/
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
Next we open /etc/yum.repos.d/kbsingh-CentOS-Extras.repo…
vi /etc/yum.repos.d/kbsingh-CentOS-Extras.repo
… and set gpgcheck to 0 and enabled to 1 in the [kbs-CentOS-Testing] section:
[...]
[kbs-CentOS-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgcheck=0
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=1
baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/
|
Afterwards we can install Apache2with mod_php5, mod_fcgid, and PHP5:
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel
Next we open /etc/php.ini…
vi /etc/php.ini
… and change the error reporting (so that notices aren’t shown any longer) and add cgi.fix_pathinfo = 1 at the end of the file:
[...]
;error_reporting = E_ALL
error_reporting = E_ALL & ~E_NOTICE
[...]
cgi.fix_pathinfo = 1
|
Next we install suPHP:
cd /tmp
wget http://suphp.org/download/suphp-0.7.1.tar.gz
tar xvfz suphp-0.7.1.tar.gz
cd suphp-0.7.1/
./configure –prefix=/usr –sysconfdir=/etc –with-apr=/usr/bin/apr-1-config –with-apxs=/usr/sbin/apxs –with-apache-user=apache –with-setid-mode=owner –with-php=/usr/bin/php-cgi –with-logfile=/var/log/httpd/suphp_log –enable-SUPHP_USE_USERGROUP=yes
make
make install
Then we add the suPHP module to our Apache configuration…
vi /etc/httpd/conf.d/suphp.conf
LoadModule suphp_module modules/mod_suphp.so
|
… and create the file /etc/suphp.conf as follows:
vi /etc/suphp.conf
[global]
;Path to logfile
logfile=/var/log/httpd/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-suphp="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
|
Finally we restart Apache:
/etc/init.d/httpd restart
Install PureFTPd
PureFTPd can be installed with the following command:
yum install pure-ftpd
Then create the system startup links and start PureFTPd:
chkconfig –levels 235 pure-ftpd on
/etc/init.d/pure-ftpd start
Install A Chrooted DNS Server (BIND9)
To install a chrooted BIND9, we do this:
yum install bind-chroot
Then do this:
chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
cp /usr/share/doc/bind-9.3.6/sample/var/named/named.local /var/named/chroot/var/named/named.local
cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
touch /var/named/chroot/etc/named.conf.local
vi /var/named/chroot/etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named/chroot/var/named";
dump-file "/var/named/chroot/var/named/data/cache_dump.db";
statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.root";
};
include "/var/named/chroot/etc/named.conf.local";
|
chkconfig –levels 235 named on
/etc/init.d/named start
Kako nisam imao mogućnost da trajno izmenim podešavanja firewall-a promenio sam dozvolu folderu html (/var/www/html) sledećom komandom:
$ chown apache:apache -R /var/www/html - hvala Zoranu Olujiću na ovom savetu.
S obzirom na ssh pristup iskoristio sam gFTP program pomoćui koga sam aplodovao potrebne datoteke na server kao i configuracionu datoteku prilikom instalacije WordPress-a. Preko PhpMyAdmin-a sam postavio potrebnu Mysql bazu.
I otprilike to bi bilo to.
Naravno sve bi bilo mnogo lakše kada bi krajni korisnik dobio malo preciznija i potpunija objašnjenja u aktivacionom e-mail-u, kao i kada bi postojao tutorijal koji bi krajnjem korisniku pomoglo prilikom instalacije i podešavanja severa.
Kako sajt koji je postavljen na grid serveru, još uvek nije u potpunosti završen, tj tekstovi se još uvek sređuju i prevode, link ka sajtu ću postaviti naknadno.
S poštovanjem
Rainmaker

više paketa za skidanje: za windows, standalone i WAR za sve platforme. Odabrao sam standalone verziju.





