Continued -->>
OpenSSL...
_________________________________
Terminal Access
ssh -l -p (port#) (user) (IP Address)
(user Password)
su
(Root Password)
_________________________________
cd /usr/ports/security/openssl
make install clean
shutdown -r now
For All Customers
mkdir /usr/local/etc/ssl.crt
cd /usr/local/etc/ssl.crt
openssl genrsa -out servername.domain.com.key 1024
openssl req -new -key servername.domain.com.key -out customerdomain.csr
Country Name: US
State: State (No Abreviations)
Locality: City
Organization Name: Company Name
Organization Unit: i.e. > Hosting
Common Name: shop.domain.com
Email Address:
webmaster@domain.com
No Challenge Password and No Optional Company Name
openssl req -noout -text -in customerdomain.csr
Now go to DirectNic or whom ever and order the SSL Certificate.
Choose Apache + OpenSSL
Open up your /usr/local/etc/ssl.crt/customerdomain.csr in MC
Copy the cert info out of it and paste it into the SSL application
When you receive the email:
cd /usr/local/etc/ssl.crt
echo '' >> customerdomain.crt
echo '' >> ca-bundle.crt
In MC open customerdomain.crt and copy you ssl cert that was email to you and save Open ca-bundle.crt and copy the ca-bundle.crt information sent to you.
Edit in MC /usr/local/etc/apache22/httpd.conf
Uncomment the following line:
Include etc/apache22/extra/httpd-ssl.conf
Edit in MC /usr/local/etc/apache22/extra/httpd-ssl.conf
under < VirtualHost _default_:443 >
Enter the correct information about Document root and ServerAlias like you did in httpd-vhost.conf file
Modify:
SSLCertificateFile /usr/local/etc/ssl.crt/customerdomain.crt
SSLCertificateKeyFile /usr/local/etc/ssl.crt/customerdomain.key
SSLCACertificateFile /usr/local/etc/ssl.crt/ca-bundle.crt
at the prompt type
apachectl stop
apachectl start
OpenSSL Installed
phpMyAdmin...
_________________________________
Terminal Access
ssh -l -p (port#) (user) (IP Address)
(user Password)
su
(Root Password)
_________________________________
mkdir /usr/local/etc/htpswd/
cd /usr/local/etc/htpswd
htpasswd -c phpMyAdmin (Type User Name Here)
New password: ******
Re-Type new password: ******
Adding password for user (User Name Here)
chmod 644 phpMyAdmin
*** To Add an Additional User ***
htpasswd -b phpMyAdmin (Type User Name Here) (Type Password Here)
Check to see if the file is there in /usr/local/etc/htpswd/
Now check to see if the user is in the file example:
root:KKfc9jFRgTP9I (this being an example password)
cd /usr/local/www/apache22/sites/(Servers main dir i.e. /"domain")/
fetch a copy of phpMyAdmin from
http://www.phpmyadmin.net/home_page/downloads.php
tar zxvf phpMyAdmin.tar.gz
ls
rm phpMyAdmin.tar.gz
cd phpMyAdmin
edit in MC config.inc.php
$cfg['PmaAbsoluteUri'] = 'http://www.yourDomain.com/phpMyAdmin/';
$cfg['Servers'][$i]['user'] = 'root'; // MySql user
$cfg['Servers'][$i]['password'] = 'rootpasswd'; // MySql password
save the file.
edit in MC .htaccess
AuthType Basic
AuthName "MySql Server Restricted Access"
AuthUserFile /usr/local/etc/htpswd/phpMyAdmin
Require valid-user
satisfy any
Save this file
shutdown -r now
phpMyAdmin is running!
when the server comes back up
http://www.(IP Address or example.com)/phpMyAdmin/
Telnet (ONLY IF ABSOLUTLY HAVE TO HAVE IT!!!!!!!!!!)
_________________________________
Terminal Access
ssh -l -p (port#) (user) (IP Address)
(user Password)
su
(Root Password)
_________________________________
echo 'inetd_enable="YES"' >> /etc/rc.conf
edit in MC /etc/inetd.conf
un-comment the following lines
telnet stream tcp nowait root /usr/libexec/telnetd telnetd
save the file
shutdown -r now
Telnet Server is running!
Pure-FTPD Server...
_________________________________
Terminal Access
ssh -l -p (port#) (user) (IP Address)
(user Password)
su
(Root Password)
_________________________________
cd /usr/ports/ftp/pure-ftpd
make config
select mysql, privsep, peruser limits, throttling, banner, sendfile
make install clean
echo 'pureftpd_enable="YES"' >> /etc/rc.conf
cd /usr/local/www/apache22/sites/(Servers main dir i.e. /"domain")/
fetch PureFTP from
http://www.pureftpd.org/project/pure-ftpd/download
tar zxvf ftp.tar.gz
rm ftp.tar.gz
cd ftp
chown www config.php
shutdown -r now
Now go to
http://www.yourdomain.com/ftp/install.php
Follow the procedures in the install script:
you want New Installation, Create new Database.
Next it needs to be localhost | root | mysql root user password
Then Connect to the database.
Next just accept the defaults.
On the configuration page only change FTP Adress with your domain ie
http://www.yourdomain.com, no http://
Next Change the Administrators password and then add Admin users if you would like.
No go back to terminal
cd /usr/local/etc
cp pure-ftpd.conf.sample pure-ftpd.conf
cp pureftpd-mysql.conf.sample pureftpd-mysql.conf
Edit in MC /usr/local/etc/pure-ftpd.conf
Uncomment and Change the following lines:
MySQLConfigFile /etc/pureftpd-mysql.conf to /usr/local/etc/pureftpd-mysql.conf
Save File and exit
edit in MC /usr/local/etc/pureftpd-mysql.conf
Uncomment and Change the following lines:
MYSQLServer 127.0.0.1
MYSQLUser ftp
MYSQLPassword tmppasswd
MYSQLDatabase ftpusers
MYSQLCrypt md5
MYSQLGetPW SELECT Password FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MYSQLGetUID SELECT Uid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MYSQLGetGID SELECT Gid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MYSQLGetDir SELECT Dir FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
Save File and exit
shutdown -r now
FTP Server is running!
http://yourdomain/ftp/
Login
Webmaster User...
_________________________________
Terminal Access
ssh -l -p (port#) (user) (IP Address)
(user Password)
su
(Root Password)
_________________________________
adduser
Username: webmaster
Full name: Webmaster
Uid (leave empty for default):
Login group [webmaster]:
Login group is webmaster. Invite webmaster into other groups? []: wheel
Login class [default]:
Shell (sh csh tcsh zsh nologin) [sh]: zsh
Home directory [/home/webmaster]:
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use an random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username : webmaster
Password : *****
Full Name : Webmaster
Uid : 1002
Class :
Groups : webmaster wheel
Home : /usr/local/www/apache22/sites
Shell : /usr/local/bin/zsh
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (webmaster) to the user database.
Add another user? (yes/no): no
Goodbye!
cd /usr/local/www/apache22/
chown -R webmaster:webmaster sites