Banner 1

How to: Apache + SSL + cURL + eAccelerator + PHP5 + MySQL + OracleXE + Webmin + SSH + VNC + Webalizer + phpMyAdmin en Debian Etch

Debido a necesidades de un cliente le he tenido que instalar todo eso en un servidor dedicado. Si alguien lo hace recomiendo que primero lo prueben en una virtual. ;)


Instalar Debian con:
Sistema de escritorio
Sistema base

Fuentes:
Configuramos las fuentes:
Código:
nano /etc/apt/sources.list
#Etch
deb http://http.us.debian.org/debian etch main contrib non-free
#deb http://non-us.debian.org/debian-non-US etch/non-US main contrib non-free
deb http://security.debian.org etch/updates main contrib non-free
#deb http://www.debian-multimedia.org etch main
deb-src http://http.us.debian.org/debian etch main contrib non-free
#Para Oracle
deb http://oss.oracle.com/debian unstable main non-free
ctrl+ X, S
apt-get update

SSH:
Código:
apt-get install ssh

Webmin
Código:
apt-get install  libauthen-pam-perl libio-pty-perl  libmd5-perl libnet-ssleay-perl
wget http://internap.dl.sourceforge.net/sourceforge/webadmin/webmin_1.410_all.deb
dpkg -i webmin_1.410_all.deb
Webmin install complete. You can now login to https://ip:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
https://ip:10000/

Apache2 + PHP5
Código:
apt-get install apache2 php5 libapache2-mod-php5 php5-gd
a2enmod rewrite
/etc/init.d/apache2 force-reload

eAccelerator
Código:
apt-get install build-essential php5-dev
cd /tmp
wget http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2
tar xvfj eaccelerator-0.9.5.2.tar.bz2
cd eaccelerator-0.9.5.2
phpize
./configure
make
make install
nano /etc/php5/conf.d/eaccelerator.ini
Ponemos:
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator
/etc/init.d/apache2 restart

cURL
Código:
apt-get install php5-curl
/etc/init.d/apache2 reload

SSL
Código:
apt-get install openssl ssl-cert
apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
a2enmod ssl
/etc/init.d/apache2 force-reload
openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout
/etc/apache2/apache.pem
Generating a 1024 bit RSA private key
...++++++
.................................++++++
writing new private key to '/etc/apache2/apache.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:MX
State or Province Name (full name) [Some-State]:DF
Locality Name (eg, city) []:Df
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:amartinezdec@abargon.com
chmod 600 /etc/apache2/apache.pem
nano /etc/apache2/sites-available/default
Cambiar:
NameVirtualHost *
por
NameVirtualHost *:80
NameVirtualHost *:443
Y agregrar dentro de la directiva :
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
SSLCertificateKeyFile /etc/apache2/apache.pem
ctrl+ X, S
nano /etc/apache2/ports.conf
Agregrar:
Listen 443
ctrl+ X, S
/etc/init.d/apache2 reload
Probamos el PHP
nano /var/www/test.php

ctrl+ X, S
https://ip/test.php

MySQL
Código:
apt-get install mysql-server mysql-client php5-mysql

Webalizer
Código:
apt-get install webalizer

PHPmyAdmin
Código:
cd /var/www/
mkdir phpmyadmin
cd /var/www/phpmyadmin
wget http://superb-west.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.6-all-languages.zip
unzip phpMyAdmin-2.11.6-all-languages.zip
https://ip/phpmyadmin/
Ponemos un theme bonito
cd /var/www/phpmyadmin/themes/
wget http://internap.dl.sourceforge.net/sourceforge/phpmyadmin/arctic_ocean-2.11a.zip
unzip arctic_ocean-2.11a.zip
nano /var/www/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = '8#$&/sdsad##';
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['ThemeDefault']='arctic_ocean';
?>
ctrl+ X, S

Oracle XE
Código:
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -
apt-get update
apt-get install oracle-xe

Executing Post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

/etc/init.d/oracle-xe configure

Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to http://127.0.0.1:8080/apex
Para verlo remotamente entrar a: http://127.0.0.1:8080/apex, loguearse, Administration, Manage HTTP Access: Seleccionar:
Available from local server and remote clients
Ahora ya puedes acceder a la página de administración desde cualquier lugar. http://ip:8080/apex

VNC
Código:
apt-get install vncserver
vncserver -geometry 1024x768 -depth 24

New 'X' desktop is nombredemáquina:1

Starting applications specified in /etc/X11/Xsession
Log file is /root/.vnc/nombredemáquina:1.log

Conectarnos ipdemáquina:1

Saludos




Agregado VNC

Falta: PostgreSQL.

No hay comentarios:

Powered by Bad Robot
Helped by Blackubay