Category: COMMANDDUMP
COMMAND DUMP – upgrading a standard proftpd install to TLS
COMMAND DUMP – upgrading a standard proftpd install to TLS
upgrade a basic proftpd install to support FTPS with these commands
cd /etc/proftpd mkdir -p ssl openssl req -new -x509 -days 365 -nodes -out /etc/proftpd/ssl/proftpd.cert.pem -keyout /etc/proftpd/ssl/proftpd.key.pem chmod 600 ssl/proftpd.*
Follow the prompts to put in your valid organization name
Then open the conf file #vi proftpd.conf and add the following (if the <IfModule mod_tls.c> directive already exist, replace the contents with the contenst below)
<IfModule mod_tls.c> TLSEngine on TLSLog /var/log/proftpd/tls.log #TLSProtocol TLSv1.2 TLSCipherSuite AES128+EECDH:AES128+EDH TLSOptions NoCertRequest AllowClientRenegotiations TLSRSACertificateFile /etc/proftpd/ssl/proftpd.cert.pem TLSRSACertificateKeyFile /etc/proftpd/ssl/proftpd.key.pem TLSVerifyClient off TLSRequired on RequireValidShell no </IfModule>
Restart proftpd
/etc/init.d/proftpd stop /etc/init.d/proftpd start
Your can test this by running the following command to make sure that you can connect using the certificate
openssl s_client -connect 127.0.0.1:21 -starttls ftp
COMMANDDUMP – Upgrading from PHP 5.3 to 5.6 on Ubuntu 14.04
COMMANDDUMP – Upgrading from PHP 5.3 to 5.6 on Ubuntu 14.04
When upgrading from PHP version 5.3 to 5.6 there are several things to worry about. On a shared system with multiple sites which do not make use of a common unit testing or library, these tools and commands could be useful to find issues. (this would also work from 5.4 or from 5.5 to 5.6)
COMMAND DUMP of things I ran.
Create a file call 5.4.php.searchterms
#echo import_request_variables >> upgrade.php.searchterms
#echo session_is_registered >> upgrade.php.searchterms
#echo session_register >> upgrade.php.searchterms
#echo session_unregister >> upgrade.php.searchterms
#echo define_syslog_variables >> upgrade.php.searchterms
#echo register_globals >> upgrade.php.searchterms
#echo sqlite >> upgrade.php.searchterms
#echo php_logo_guid >> upgrade.php.searchterms
#echo php_egg_logo_guid >> upgrade.php.searchterms
#echo php_real_logo_guid >> upgrade.php.searchterms
#echo zend_logo_guid >> upgrade.php.searchterms
#echo register_long_arrays >> upgrade.php.searchterms
#find -type f -name ‘*.php’ -exec grep -f upgrade.php.searchterms {} \; -ls
Check the version of your server
#lsb_release -a
#dpkg -l |grep php|grep apache
#php -v
#apache2ctl -vV
To upgrade from ubuntu 14.04 LTS you have to get php 5.6 from another repository as it is not includedin the default repos
apt-get -y update
apt-get install -y software-properties-common
add-apt-repository ppa:ondrej/php5-5.6 -y
apt-get -y update
apt-get -y install php5 php5-cli php5-common php5-curl php5-gd php5-imap php5-json php5-mysql php5-readline
You will be prompted when installing the latest version of PHP5 whether you want to keep the old or new version of PHP5.ini I chosed to install the pakage maintainer’s version, then I compare the two and update the new one with the differences. The following command makes it easy to compare by removing all of the commented lines from the diff against the backed up file
cd /etc/php5/apache2 diff <(grep -v '^\s*;' php.ini|awk '$1 != ""') <(grep -v '^\s*;' php.ini.ucf-old|awk '$1 != ""')|more
I also updated the php.ini date.timezone setting to my area due to this php.net post
date.timezone = America/Boise /etc/init.d/apache2 reload