Академический Документы
Профессиональный Документы
Культура Документы
Ubuntu
Actualizar Servidor
>> sudo apt-get update && sudo apt-get upgrade -y
OPenSSH
Instalar OpenSSH-Server para administracin con Putty y SFTP:
>> sudo apt-get install openssh-server
Configurar OpenSSH
>> sudo nano /etc/ssh/sshd_config
VirtualBox
OS : Ubuntu 14.04 LTS Server (No GUI)
IP Address : 10.1.1.5/24
Actualizar Servidor:
>> sudo apt-get update && sudo apt-get upgrade -y
Installing VirtualBox
Edit /etc/apt/sources.list file:
>> sudo nano /etc/apt/sources.list
Add the latest oracle virtualbox repository to your Ubuntu server. You can
download the oracle virtualbox latest repository from here.
[...]
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
Now, update the repository and install latest oracle virtualbox version.
After installing virtualbox, add the system user sk to the vboxusers group. sk is
the system normal user that I have created already. You can create and use a
separate new user as your wish. If you use different user, log out and log in
back to that user and do the rest of the steps.
>> sudo usermod -aG vboxusers manager
Now, run the following command to check if virtualbox kernel modules are
loaded or not.
>> sudo /etc/init.d/vboxdrv status
Sample output:
VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are
loaded.
Thats it Oracle VirtualBox and Extension pack have been installed successfully
on our Ubuntu 14.04 LTS server. Start using Oracle VirtualBox! For creating and
managing virtual machines from the command line, refer the official manual.
http://www.virtualbox.org/manual/ch08.html
Install Apache
Test Apache:
Install PHP
To test PHP, create a sample testphp.php file in Apache document root folder.
<?php
phpinfo();
?>
Install phpVirtualBox
Before installing phpVirtualBox, we have to install Apache web server and PHP.
To install Apache, PHP refer the following link.
v4lm3x
Now, Download the latest version from the phpVirtualBox official site.
wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-2.zip
unzip phpvirtualbox-4.3-2.zip
Configure phpVirtualBox
sudo cp /var/www/html/phpvirtualbox/config.php-example
/var/www/html/phpvirtualbox/config.php
sudo nano /var/www/html/phpvirtualbox/config.php
Change the username/password for system user that runs VirtualBox. In our
case, the username/password is sk/ubuntu.
[...]
var $username = 'vbox';
var $password = 'v4lm3x';
[...]
VBOXWEB_USER=sk
Now, go to any client systems that has installed with GUI desktop
environements, and try to access the URL http://ip-address-of-virtualboxheadless-server/phpvirtualbox from the web browser.
Now, try again the same URL mentioned above. The following screen should
appear. Enter the username/password.
# Instalamos Apache
sudo aptitude install apache2
# Reiniciamos el servidor
sudo /etc/init.d/apache2 restart
cd /etc/apache2
sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out
server.crt
cd /etc/apache2/sites-available
sudo vim default-ssl
# habilitamos el archivo
PHPSysinfo
Phpsysinfo: es una herramienta web, que permite ver el estado de nuestros
servidores web en tiempo real, nos permite monitorear: procesos, estado y
espacio en disco, estado de la memoria, cache, procesador, tarjetas de red,
etc... La instalacin en ubuntu es muy fcil, solo tenemos que escribir en una
terminal:
sudo apt-get install phpsysinfo
Configurar en:
>> sudo nano /etc/phpsysinfo/config.php
Nota: la ruta final, puede cambiar dependiendo de la configuracin de tu
servidor. Para instalar la ultima versin o instalarlo en otro sistema,
descargamos el paquete de la siguiente direccin:
http://phpsysinfo.sourceforge.net/
http://tu_servidor/phpsysinfo
Antivirus CLAMAV
1. Install clamav and clamav-daemon. Clamav daemon is for automated use.
100%
[===============================================
===========>] 68
--.-K/s in 0s
5. Check again the directory should contain the downloaded test virus :
/home/ehowstuff/.bash_logout: OK
/home/ehowstuff/.bash_history: OK
/home/ehowstuff/.profile: OK
/home/ehowstuff/.bashrc: OK
/home/ehowstuff/.cache/motd.legal-displayed: Empty file
/home/ehowstuff/.viminfo: OK
/home/ehowstuff/jcameron-key.asc: OK
/home/ehowstuff/.rnd: OK
/home/ehowstuff/index.html: OK
/home/ehowstuff/.ssh/known_hosts: OK
/home/ehowstuff/eicar.com: Eicar-Test-Signature FOUND
7. Scan again home directory. The downloaded virus file should be remove
now :
Infected files: 0
Data scanned: 4.66 MB
Data read: 1.04 MB (ratio 4.47:1)
Time: 20.151 sec (0 m 20 s)
[ OK ]
12. See more option for clamscan by issue sudo clamscan help command:
--help
--version
-h
-V
--verbose
-v
--archive-verbose
Be verbose
-a
--debug
--quiet
--stdout
--no-summary
--infected
--suppress-ok-results -o
--bell
--tempdir=DIRECTORY
--leave-temps[=yes/no(*)]
--database=FILE/DIR -d FILE/DIR
-l FILE
--recursive[=yes/no(*)] -r
--allmatch[=yes/no(*)] -z
match
--cross-fs[=yes(*)/no]
--follow-dir-symlinks[=0/1(*)/2]
direct, 2 = always)
--follow-file-symlinks[=0/1(*)/2]
2 = always)
--file-list=FILE
-f FILE
--remove[=yes/no(*)]
--move=DIRECTORY
--copy=DIRECTORY
--exclude=REGEX
--exclude-dir=REGEX
--include=REGEX
--include-dir=REGEX
--bytecode[=yes(*)/no]
--bytecode-unsigned[=yes/no(*)]
--bytecode-timeout=N
--bytecode-statistics[=yes/no(*)]
--detect-pua[=yes/no(*)]
--exclude-pua=CAT
--include-pua=CAT
--detect-structured[=yes/no(*)]
--structured-ssn-format=X
--structured-ssn-count=N
--structured-cc-count=N
--scan-mail[=yes(*)/no]
--phishing-sigs[=yes(*)/no]
--phishing-scan-urls[=yes(*)/no]
--phishing-cloak[=yes/no(*)]
module)
Scan PE files
--scan-elf[=yes(*)/no]
--scan-ole2[=yes(*)/no]
--scan-pdf[=yes(*)/no]
--scan-swf[=yes(*)/no]
--scan-html[=yes(*)/no]
--scan-archive[=yes(*)/no]
--detect-broken[=yes/no(*)]
--block-encrypted[=yes/no(*)]
--nocerts
in PE files
--dumpcerts
--max-filesize=#n
assumed clean
--max-scansize=#n
each container file (**)
--max-files=#n
container file (**)
--max-recursion=#n
container file (**)
--max-dir-recursion=#n
--max-embeddedpe=#n
PE
--max-htmlnormalize=#n
--max-htmlnotags=#n
scan
--max-scriptnormalize=#n
--max-ziptypercg=#n
Done!!
Configurar IP en Ubuntu
auto lo
iface lo inet loopback
auto ethX
iface ethX inet dhcp
Donde ethX hay que sustituir la X por el numero de la tarjeta de red que se
quiera configurar, por ejemplo, eth0, o eth1...
Configuracin estatica:
auto lo
iface lo inet loopback
auto ethX
iface ethX inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
De la misma forma que antes, la X de ethX hay que sustituirla por el numero de
la tarjeta de red en cuestin que se quiera configurar.
Despues de cualquier cambio que se realice hay que reiniciar las tarjetas de
red, para ello se pueden utilizar estos comandos:
Nota: con este comando reiniciaramos todas las tarjetas de red del ordenador.
Puede sustituirse la palabra restart, por stop o start para pararlas e iniciarlas.
Por ejemplo para reiniciar la tarjeta de red eth0 sera primero ifdown eth0, y
luego ifup eth0.
Ver la configuracin:
ifconfig
Zentyal
The preferred way to install Zentyal on a new machine from scratch is using our
tailored CD installer. This CD contains Zentyal and all its dependencies. The 4.0
version is based on Ubuntu Server 14.04 and is available at:
- http://www.zentyal.org/server/
Note: If you want to define the partition layout manually or you need to specify
a proxy to get Internet access, make sure you install using the "expert mode".
Once the installation process is done, you can access the web interface using a
web browser (usually from another machine in the same network):
https://<zentyal-ip-address>:8443/
To log in, a user name and password is asked, this data is asked during the first
stage of the installation. But any other user belonging to the "sudo" group
could be used to log in as well.
Note: The installers are generated from time to time, so maybe some packages
contained on them are outdated. If you have Internet connection during the
installation, the latest version of the packages will be installed from our
repositories.
You can also install Zentyal as a "package set" to an already installed version of
Ubuntu. This was developed and tested with Ubuntu version 14.04.
For Ubuntu 14.04 (Trusty). You should install the server edition of Ubuntu.
In order to authenticate the packages in the PPA and Zentyal repository you
can import its public key with the following command:
Zentyal has a modular design that allows you to install or remove modules
depending on your needs.
After editing your sources.list, make sure that your package database is up to
date by running the following command:
And then point your browser to the Zentyal IP address and follow the
instructions on screen:
https://<zentyal-ip-address>/
If you want to install the full graphical environment you can install zenbuntudesktop instead of just zentyal:
After installing zenbuntu-desktop your Ubuntu will be in almost the same state
as if you were used the the official Zentyal Installer, you just need to reboot
your server (simulating the finish of the first stage of the installation) and on
the next boot the Zentyal core packages will be installed and you will be able to
continue the installation from the desktop environment.
You can also use the command line to install the packages.
Example: