installation Archives - David Yin's Blog https://www.yinfor.com/tag/installation Tech geek. Life geek. Thu, 18 Apr 2024 20:50:48 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://www.yinfor.com/wp-content/uploads/2016/09/cropped-icon-120x120.png installation Archives - David Yin's Blog https://www.yinfor.com/tag/installation 32 32 Try Ubuntu 22.04 Lts Beta on Proxmox Virtual Machine https://www.yinfor.com/2024/04/try-ubuntu-22-04-lts-beta-on-proxmox-virtual-machine.html https://www.yinfor.com/2024/04/try-ubuntu-22-04-lts-beta-on-proxmox-virtual-machine.html#respond Thu, 18 Apr 2024 20:50:44 +0000 https://www.yinfor.com/?p=9614 Ubuntu is the only Linux distribution I am using right now. I prefer to use LTS version. LTS means long-term support version. It is released every two years. The last version is Ubuntu  22.04LTS. The next one is Ubuntu 24.04LTS....

The post Try Ubuntu 22.04 Lts Beta on Proxmox Virtual Machine appeared first on David Yin's Blog.

]]>
Ubuntu is the only Linux distribution I am using right now. I prefer to use LTS version. LTS means long-term support version. It is released every two years. The last version is Ubuntu  22.04LTS. The next one is Ubuntu 24.04LTS. It will be released on April 25, 2024. So now it is the Beta version.

See the life cycle of Ubuntu releases.

I downloaded the Ubuntu 24.04 LTS Beta build from the official website.

Then in my Proxmox VE installation, I uploaded the ISO file to the location of ISO images.

Create a new VM, with this ISO file, ubuntu-24.04-beta-live-server-amd64.iso, 2.81G.

The first thing I installed on the VM is Webmin Panel.

Install the Nginx with the default.

sudo apt install nginx
davidyin@u24:~$ nginx -V
nginx version: nginx/1.24.0 (Ubuntu)
built with OpenSSL 3.0.10 1 Aug 2023 (running with OpenSSL 3.0.13 30 Jan 2024)
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/nginx-uqDps2/nginx-1.24.0=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/nginx-uqDps2/nginx-1.24.0=/usr/src/nginx-1.24.0-2ubuntu7 -fPIC -Wdate-time -D_FORTIFY_SOURCE=3' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=stderr --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-mail_ssl_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-http_geoip_module=dynamic --with-http_image_filter_module=dynamic --with-http_perl_module=dynamic --with-http_xslt_module=dynamic --with-mail=dynamic --with-stream=dynamic --with-stream_geoip_module=dynamic

Install the MariaDB server

sudo apt install mariadb-server

Add the password to the root user of MariaDB

sudo mysql_secure_installation

 

davidyin@u24:~$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n]
Enabled successfully!
Reloading privilege tables..
 ... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB 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]
 ... 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]
 ... Success!

By default, MariaDB 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]
 - 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]
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Go back to the Webmin panel and click the link “Refresh Modules”. Then check the Server /  MySQL Database Server.

Here I can add a new database, add new users, etc.

Install PHP 8.3 which is in the default reposit.

sudo apt install php8.3 php8.3-fpm php8.3-cli php8.3-common php8.3-mbstring php8.3-gd php8.3-intl php8.3-xml php8.3-mysql php8.3-zip php8.3-curl

Check the version in the terminal window

davidyin@u24:~$ php -v
PHP 8.3.6 (cli) (built: Apr 15 2024 19:21:47) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies

Check the php8.3-fpm status

sudo service php8.3-fpm status


Up to now, I can add a new website on the server. I leave it for you.

 

 

The post Try Ubuntu 22.04 Lts Beta on Proxmox Virtual Machine appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/04/try-ubuntu-22-04-lts-beta-on-proxmox-virtual-machine.html/feed/ 0
Gitlab on-premise installation https://www.yinfor.com/2023/05/gitlab-on-premise-installation.html https://www.yinfor.com/2023/05/gitlab-on-premise-installation.html#respond Sat, 20 May 2023 05:30:02 +0000 https://www.yinfor.com/?p=8876 I have the Gitlab CE running on one of the Virtual Machines. The VM is hosted on my Proxmox VE system. The Gitlab CE is installed in Omnibus (Linux Package) method. Gitlab install requirements The minimum requirements from the Gitlab...

The post Gitlab on-premise installation appeared first on David Yin's Blog.

]]>
I have the Gitlab CE running on one of the Virtual Machines. The VM is hosted on my Proxmox VE system. The Gitlab CE is installed in Omnibus (Linux Package) method.

Gitlab install requirements

The minimum requirements from the Gitlab official docs.

  • Storage:  Omnibus Gitlab package requires about 2.5GB of storage space for installation. I suggest at least 50GB if you don’t have a lot of repositories.
  • CPU: 4 cores is the recommended minimum number of cores and supports up to 500 users.
  • Memory: 4GB RAM is the required minimum memory size and supports up to 500 users.
  • Database: PostgreSQL is the only supported database, which is bundled with the Omnibus Gitlab package.

The VM basic information is as below:

VM basic information for Gitlab

 

 

Based on the minimum requirements, I am the only user for this Gitlab installation. So I chose 4 Cores, 4GB Ram, and 64 GB storage.

Look at the Webmin dashboard of this VM. The resources are OK.

Gitlab VM, Webmin Dashboard

 

Oh, I forget the domain setup. I pointed the sub-domain, or hostname, gitlab.g2soft.net to the Lan IP address, 192.168.100.182.  So I can use the sub-domain to access the gitlab installation. And it is only be access inside of the LAN.

I am also get the one-year free SSL certificate at AlibabaCloud platform.

Now the VM is Ubuntu 22.04 LTS. Please be noticed that it is upgraded from Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04.  The Gitlab installation is on this VM from the very beginning.  But the hardware which runs the host, Proxmox was changed from time to time. Including Dell R710, PC Server, etc.

Installation Method

The official installation method of Omnibus Gitlab

 

Gitlab System and versions

Check the information on Gitlab in the Ubuntu SSH window.

davidyin@gitlab:~$ sudo gitlab-rake gitlab:env:info

System information
System: Ubuntu 22.04
Current User: git
Using RVM: no
Ruby Version: 3.0.6p216
Gem Version: 3.2.33
Bundler Version:2.3.15
Rake Version: 13.0.6
Redis Version: 6.2.11
Sidekiq Version:6.5.7
Go Version: unknown

GitLab information
Version: 15.11.4
Revision: f07ef899392
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 13.8
URL: https://gitlab.g2soft.net
HTTP Clone URL: https://gitlab.g2soft.net/some-group/some-project.git
SSH Clone URL: git@gitlab.g2soft.net:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 14.18.0
Repository storages:
- default: unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell

Sign in https://gitlab.g2soft.net with a root account. See the Dashboard of the Admin Area.

 

Dashboard of Admin Area, Gitlab 15

Now, 22 projects, have 2 users, One is the root of Administrator, and the other one is my regular use of coding.

It is almost four years since I started to use Gitlab. I am still very comfortable recommending it to anyone who wants to host their own codes at Homelab.

My Gitlab installation is version 15.11.4. I am looking forward to seeing the next big release Gitlab 16.0. It may be released on 22nd May.

 

 

The post Gitlab on-premise installation appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2023/05/gitlab-on-premise-installation.html/feed/ 0
How to make php7.4 support dBase function? https://www.yinfor.com/2022/03/how-to-make-php7-4-support-dbase-function.html https://www.yinfor.com/2022/03/how-to-make-php7-4-support-dbase-function.html#respond Wed, 02 Mar 2022 21:00:51 +0000 https://www.yinfor.com/?p=8041 I am using the php dBase extension for many years. Because I have a PHP program that needs to retrieve data from a dBase database file. The dBase file is from a Windows program. I posted five years ago to...

The post How to make php7.4 support dBase function? appeared first on David Yin's Blog.

]]>
I am using the php dBase extension for many years. Because I have a PHP program that needs to retrieve data from a dBase database file. The dBase file is from a Windows program. I posted five years ago to show you the simple way to install the dBase extension on php7.0.

Now it is 2022, It is the guide on Ubuntu 20.04 Lts, and php7.4.

Let me make it quick.

Run the following command after you install php7.4 on Ubuntu 20.04.

sudo apt install php-pear php-dev

sudo pcel install dbase-7.1.1

The first command is to install the PECL environment.  The second command is to install the dBase extension into the system through PECL. The latest version is 7.1.1.

After installation, the result asked me to manually add the following into the php.ini file.

extension=dbase.so

So I edit the /etcd/php/7.4/fpm/php.ini, add it to the end of the file.

Then run the phpinfo page to check it.

To check the PHP functions with the dBase file,  https://www.php.net/manual/en/intro.dbase.php

The post How to make php7.4 support dBase function? appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2022/03/how-to-make-php7-4-support-dbase-function.html/feed/ 0
php 8.0 on Ubuntu 20.04 https://www.yinfor.com/2021/01/php-8-0-on-ubuntu-20-04.html https://www.yinfor.com/2021/01/php-8-0-on-ubuntu-20-04.html#respond Mon, 25 Jan 2021 00:38:48 +0000 https://www.yinfor.com/?p=7599 PHP 8.0 has been released officially to the General Availability on November 26, 2020. I got no chance to install it and test it. Yesterday I did the test run on my Vultr VPS. Firstly, I prepare the VPS. I...

The post php 8.0 on Ubuntu 20.04 appeared first on David Yin's Blog.

]]>
PHP 8.0 has been released officially to the General Availability on November 26, 2020. I got no chance to install it and test it. Yesterday I did the test run on my Vultr VPS.

Firstly, I prepare the VPS.

I created a new VPS on Vultr.  1GB RAM is good enough. I chose Ubuntu 20.04LTS OS.

When the VPS is in running status, I SSH to the server and run the commands apt update and apt upgrade to make the system updated.

Then, I installed Webmin on it.

I am also using TCP Wrapper to limit the ssh by my own IP address.

Secondly, Install Nginx Web Server

Regarding web servers, I always choose Nginx Web Server.

sudo apt install nginx

The version is 1.18.0. from the Ubuntu official repositories.

Thirdly, Install PHP 8.0

Because the php version shipped with Ubuntu 20.04 is php7.4. I have to add another PPA resource to install php8.0.
So, add ppa:ondrej/php to my server software sources.

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Run the following command to install php 8.0 and some extensions.

sudo apt install php8.0 php8.0-fpm php8.0-cli php8.0-common php8.0-mbstring php8.0-gd php8.0-intl php8.0-xml php8.0-mysql php8.0-zip php8.0-curl

After that, I input the command php -v to check the version information.

davidyin@roolife:~$ php -v
PHP 8.0.1 (cli) (built: Jan 13 2021 08:22:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.1, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.1, Copyright (c), by Zend Technologies

I implemented a web site on this server and use phpinfo() function to output the main information of this php 8.0 installation.

 

The full phpinfo output is here. I have not tried to run my favorite programs on PHP 8 .0.1, including WordPress, PhpBB, etc. Later I will try and report it here.

The post php 8.0 on Ubuntu 20.04 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2021/01/php-8-0-on-ubuntu-20-04.html/feed/ 0
The simple way to install the dbase extension on php7.0 https://www.yinfor.com/2017/04/simple-way-install-dbase-extension-php7-0.html https://www.yinfor.com/2017/04/simple-way-install-dbase-extension-php7-0.html#respond Tue, 11 Apr 2017 20:07:44 +0000 https://www.yinfor.com/?p=5063 Here is the simple way to install the dbase extension. One command only.   sudo pecl install dbase-7.0.0beta1 It will install the extension for you. You just need to restart php7.0-fpm service. Check the php information. If your php is...

The post The simple way to install the dbase extension on php7.0 appeared first on David Yin's Blog.

]]>
Here is the simple way to install the dbase extension. One command only.

 

sudo pecl install dbase-7.0.0beta1

It will install the extension for you. You just need to restart php7.0-fpm service.

Check the php information.

If your php is version 5 to 5.7. Change the command to

sudo pecl install dbase

Go to php.net and look at the introduction of dBase section.

This extension has been moved to the PECL repository and is no longer bundled with PHP as of PHP 5.3.0.

That’s why we have to install this extension from pecl installation.

https://pecl.php.net/package/dbase

https://php.net/manual/en/intro.dbase.php

The post The simple way to install the dbase extension on php7.0 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2017/04/simple-way-install-dbase-extension-php7-0.html/feed/ 0
Post your new Blog post notice on Facebook from MovableType https://www.yinfor.com/2016/01/post-your-new-blog-post-notice-on-facebook-from-movabletype.html https://www.yinfor.com/2016/01/post-your-new-blog-post-notice-on-facebook-from-movabletype.html#respond Wed, 13 Jan 2016 00:13:36 +0000 https://www.yinfor.com/?p=4716 I have a blog which is powered by MovableType. Everyone use facebook, almost everyone. I think to put a notice on Facebook when I have new post on my Blog is a good idea. So I did a search and...

The post Post your new Blog post notice on Facebook from MovableType appeared first on David Yin's Blog.

]]>
I have a blog which is powered by MovableType.

Everyone use facebook, almost everyone. I think to put a notice on Facebook when I have new post on my Blog is a good idea. So I did a search and finally found this one, FBWallPost.

FBWallPost is build by the same author of PostTwiOauth.

PostTwiOauth is another plugin for MovableType, which is used to publish a tweet on twitter when a new blog post published.

FBWallPost can do the same job, but on Facebook.

The latest version of FBWallPost is v 0.17.

My experience of it is as below:

  • MovableType 6.2.2.
  • Facebook API 2.5

fbwallpost-settings

Here is the official page of FBWallPost plugin.

Here is the backup link of the plugin v0.17, I prefer you can download it from the official site.

Now, it is my simply way to install it.

  1. Download the plugin file with tar format
  2. Decompress it and copy the plugin files into my MovableType plugin folder
  3. Sign in MT backend and go to System > plugins list, to check it, make sure it is enabled.
  4. Go to the blog section.
  5. Go to Tools > plugins > FBWallPost
    blog-tools-plugins
  6. Follow the link on settings:
    1. Register a APP, choose WEB Site. (Enter contact email, change status to live)
    2. Enter the App ID and Secret into settings, Save
    3. Get Access token
    4. Choose Facebook page, I will post on page, not profile
    5. Post Test.
    6. Done

The post Post your new Blog post notice on Facebook from MovableType appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2016/01/post-your-new-blog-post-notice-on-facebook-from-movabletype.html/feed/ 0
Tools to check your SSL Installation https://www.yinfor.com/2015/09/tools-to-check-your-ssl-installation.html https://www.yinfor.com/2015/09/tools-to-check-your-ssl-installation.html#respond Sat, 19 Sep 2015 15:43:12 +0000 https://www.yinfor.com/?p=4541 I have tried some tools to diagnose my SSL certificate installation. Some related to correct certificate, and more on certificate chain issues. SSL Certificates are trusted from its parent, or issued by its high lever certificate. It looks like a...

The post Tools to check your SSL Installation appeared first on David Yin's Blog.

]]>
I have tried some tools to diagnose my SSL certificate installation.

Some related to correct certificate, and more on certificate chain issues.

SSL Certificates are trusted from its parent, or issued by its high lever certificate. It looks like a chain, one connect to other one and gos to the CA root.

Say, I have a SSL certificate for domain seo.g2soft.net.

  • Certificate of seo.g2osft.net is issued by Comodo RSA domain Validation Secure Server CA
  • Comodo RSA domain Validation Secure Server CA is issued by Comodo RSA certification Authority
  • Comodo Rsa Certification Authority is issued by AddTrust External CA Root.

The last one, AddTrust External CA Root is one of root CAs.  It is issued by itself. Root Certificates was installed in every computer or browsers already. It is trusted and in the trust store.

certificate-chain

The above is a corrected installation.

Tool One:

Geocerts SSL Checker

https://www.geocerts.com/ssl_checker

Tool Two:

DigiCert SSL Installation Diagnostics Tool

https://www.digicert.com/help/

Tool Three:

Symantec CryptoReport – Check SSL/TLS certificate installation

https://cryptoreport.websecurity.symantec.com/checker/

symantec-check-certs

Tool Four:

The most powerful tool, SSL Server Test from Qualys SSL LABs

https://www.ssllabs.com/ssltest/

It provides more details of your SSL implement.

Let me show you the SSL Report: seo.g2soft.net

seo-test-reslut

Server Key and Certificate #1
Common names seo.g2soft.net
Alternative names seo.g2soft.net www.seo.g2soft.net
Prefix handling Both (with and without WWW)
Valid from Sun, 05 Apr 2015 00:00:00 UTC
Valid until Wed, 04 Apr 2018 23:59:59 UTC (expires in 2 years and 6 months)
Key RSA 2048 bits (e 65537)
Weak key (Debian) No
Issuer COMODO RSA Domain Validation Secure Server CA
Signature algorithm SHA256withRSA
Extended Validation No
Certificate Transparency No
Revocation information CRL, OCSP
Revocation status Good (not revoked)
Trusted Yes
Additional Certificates (if supplied)
Certificates provided 3 (4310 bytes)
Chain issues None
#2
Subject COMODO RSA Domain Validation Secure Server CA 
Fingerprint: 339cdd57cfd5b141169b615ff31428782d1da639
Valid until Sun, 11 Feb 2029 23:59:59 UTC (expires in 13 years and 4 months)
Key RSA 2048 bits (e 65537)
Issuer COMODO RSA Certification Authority
Signature algorithm SHA384withRSA
#3
Subject COMODO RSA Certification Authority 
Fingerprint: f5ad0bcc1ad56cd150725b1c866c30ad92ef21b0
Valid until Sat, 30 May 2020 10:48:38 UTC (expires in 4 years and 8 months)
Key RSA 4096 bits (e 65537)
Issuer AddTrust External CA Root
Signature algorithm SHA384withRSA
Certification Paths
Path #1: Trusted
1 Sent by server seo.g2soft.net 
Fingerprint: 8546af1a5d3f71e8001434e08df90e5b412f59f0 
RSA 2048 bits (e 65537) / SHA256withRSA
2 Sent by server COMODO RSA Domain Validation Secure Server CA 
Fingerprint: 339cdd57cfd5b141169b615ff31428782d1da639 
RSA 2048 bits (e 65537) / SHA384withRSA
3 In trust store COMODO RSA Certification Authority   Self-signed
Fingerprint: afe5d244a8d1194230ff479fe2f897bbcd7a8cb4 
RSA 4096 bits (e 65537) / SHA384withRSA
Path #2: Trusted
1 Sent by server seo.g2soft.net 
Fingerprint: 8546af1a5d3f71e8001434e08df90e5b412f59f0 
RSA 2048 bits (e 65537) / SHA256withRSA
2 Sent by server COMODO RSA Domain Validation Secure Server CA 
Fingerprint: 339cdd57cfd5b141169b615ff31428782d1da639 
RSA 2048 bits (e 65537) / SHA384withRSA
3 Sent by server COMODO RSA Certification Authority 
Fingerprint: f5ad0bcc1ad56cd150725b1c866c30ad92ef21b0 
RSA 4096 bits (e 65537) / SHA384withRSA
4 In trust store AddTrust External CA Root   Self-signed
Fingerprint: 02faf3e291435468607857694df5e45b68851868 
RSA 2048 bits (e 65537) / SHA1withRSA 
Weak or insecure signature, but no impact on root certificate


Configuration

Protocols
TLS 1.2 Yes
TLS 1.1 Yes
TLS 1.0 Yes
SSL 3 No
SSL 2 No
Cipher Suites (SSL 3+ suites in server-preferred order; deprecated and SSL 2 suites at the end)
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   ECDH 256 bits (eq. 3072 bits RSA)   FS 128
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)   ECDH 256 bits (eq. 3072 bits RSA)   FS 256
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 128
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   ECDH 256 bits (eq. 3072 bits RSA)   FS 128
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   ECDH 256 bits (eq. 3072 bits RSA)   FS 128
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (0xc028)   ECDH 256 bits (eq. 3072 bits RSA)   FS 256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)   ECDH 256 bits (eq. 3072 bits RSA)   FS 256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x67)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 128
TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x33)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 128
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (0x6b)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 256
TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x39)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 256
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (0xc012)   ECDH 256 bits (eq. 3072 bits RSA)   FS 112
TLS_RSA_WITH_AES_128_GCM_SHA256 (0x9c) 128
TLS_RSA_WITH_AES_256_GCM_SHA384 (0x9d) 256
TLS_RSA_WITH_AES_128_CBC_SHA256 (0x3c) 128
TLS_RSA_WITH_AES_256_CBC_SHA256 (0x3d) 256
TLS_RSA_WITH_AES_128_CBC_SHA (0x2f) 128
TLS_RSA_WITH_AES_256_CBC_SHA (0x35) 256
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA (0x88)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 256
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA (0x84) 256
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA (0x45)   DH 2048 bits (p: 256, g: 1, Ys: 256)   FS 128
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA (0x41) 128
TLS_RSA_WITH_3DES_EDE_CBC_SHA (0xa) 112

 

Handshake Simulation
Android 2.3.7   No SNI 2 TLS 1.0 TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x33)   FS 128
Android 4.0.4 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Android 4.1.1 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Android 4.2.2 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Android 4.3 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Android 4.4.2 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Android 5.0.0 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Baidu Jan 2015 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
BingPreview Jan 2015 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Chrome 43 / OS X  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Firefox 31.3.0 ESR / Win 7 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Firefox 39 / OS X  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Googlebot Feb 2015 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
IE 6 / XP   No FS 1   No SNI 2 Protocol or cipher suite mismatch Fail3
IE 7 / Vista TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
IE 8 / XP   No FS 1   No SNI 2 TLS 1.0 TLS_RSA_WITH_3DES_EDE_CBC_SHA (0xa)   No FS 112
IE 8-10 / Win 7  R TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
IE 11 / Win 7  R TLS 1.2 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e)   FS 128
IE 11 / Win 8.1  R TLS 1.2 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e)   FS 128
IE 10 / Win Phone 8.0 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
IE 11 / Win Phone 8.1  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   FS 128
IE 11 / Win Phone 8.1 Update  R TLS 1.2 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e)   FS 128
Edge 12 / Win 10 (Build 10130) R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Java 6u45   No SNI 2 Client does not support DH parameters > 1024 bits Fail3
Java 7u25 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Java 8u31 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
OpenSSL 0.9.8y TLS 1.0 TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x33)   FS 128
OpenSSL 1.0.1l  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
OpenSSL 1.0.2  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
Safari 5.1.9 / OS X 10.6.8 TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Safari 6 / iOS 6.0.1  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   FS 128
Safari 6.0.4 / OS X 10.8.4  R TLS 1.0 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   FS 128
Safari 7 / iOS 7.1  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   FS 128
Safari 7 / OS X 10.9  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   FS 128
Safari 8 / iOS 8.4  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   FS 128
Safari 8 / OS X 10.10  R TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   FS 128
Yahoo Slurp Jan 2015 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
YandexBot Jan 2015 TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   FS 128
(1) Clients that do not support Forward Secrecy (FS) are excluded when determining support for it.
(2) No support for virtual SSL hosting (SNI). Connects to the default site if the server uses SNI.
(3) Only first connection attempt simulated. Browsers tend to retry with a lower protocol version.
(R) Denotes a reference browser or client, with which we expect better effective security.
(All) We use defaults, but some platforms do not use their best protocols and features (e.g., Java 6 & 7, older IE).
Protocol Details
Secure Renegotiation Supported
Secure Client-Initiated Renegotiation No
Insecure Client-Initiated Renegotiation No
BEAST attack Not mitigated server-side (more info)   TLS 1.0: 0xc013
POODLE (SSLv3) No, SSL 3 not supported (more info)
POODLE (TLS) No (more info)
Downgrade attack prevention Yes, TLS_FALLBACK_SCSV supported (more info)
SSL/TLS compression No
RC4 No
Heartbeat (extension) Yes

 

Heartbleed (vulnerability) No (more info)
OpenSSL CCS vuln. (CVE-2014-0224) No (more info)
Forward Secrecy Yes (with most browsers)   ROBUST (more info)
Next Protocol Negotiation (NPN) Yes   spdy/3.1 http/1.1
Session resumption (caching) Yes
Session resumption (tickets) Yes
OCSP stapling Yes
Strict Transport Security (HSTS) Yes   max-age=15768000
Public Key Pinning (HPKP) No
Long handshake intolerance No
TLS extension intolerance No
TLS version intolerance No
Incorrect SNI alerts No
Uses common DH primes No
DH public server param (Ys) reuse No
SSL 2 handshake compatibility Yes

 

Miscellaneous
Test date Sat, 19 Sep 2015 00:12:02 UTC
Test duration 110.111 seconds
HTTP status code 200
HTTP server signature nginx/1.8.0
Server hostname seo.g2soft.net

Above is the full report I made today.

 

 

The post Tools to check your SSL Installation appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2015/09/tools-to-check-your-ssl-installation.html/feed/ 0
Certificate Installation: NGINX with Comodo SSL https://www.yinfor.com/2015/09/certificate-installation-nginx-with-comodo-ssl.html https://www.yinfor.com/2015/09/certificate-installation-nginx-with-comodo-ssl.html#respond Sat, 19 Sep 2015 01:28:10 +0000 https://www.yinfor.com/?p=4536 Here is the guide to show you how to install the Comodo SSL certificate in Nginx. Order Comodo Certificate. And received the Certificate files. I don’t discuss how to get it, where to get it. It is another topic. You...

The post Certificate Installation: NGINX with Comodo SSL appeared first on David Yin's Blog.

]]>
Here is the guide to show you how to install the Comodo SSL certificate in Nginx.

  1. Order Comodo Certificate. And received the Certificate files.
    I don’t discuss how to get it, where to get it. It is another topic. You will receive following files.
    Positive SSL certificate, it is a zip file emailed to you. Unzip it and get four files.
    PositiveSSL-Shalom-Campus1

    • Root CA Certificate – AddTrustExternalCARoot.crt
    • Intermediate CA Certificate – COMODORSAAddTrustCA.crt
    • Intermediate CA Certificate – COMODORSADomainValidationSecureServerCA.crt
    • Your PositiveSSL Certificate – www_example_com.crt (or the subdomain you gave them)
  2. Make the file for Nginx
    cat  www_example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt > your_domain_crt.pem 

    I just need your certificate and intermediate certificates. Root is already installed in every single computer or browser. The order of certificates is important.

  3. Save this file into the place you want Nginx use
    mv your_domain_crt.pem /etc/nginx/ssl/
  4. Save your private key in the same place
    mv your_domain_key.pem
  5. Make sure your Nginx config file looks like below
    server {
    listen 443 ssl;
    
    ssl_certificate /etc/nginx/ssl/your_domain_crt.pem;
    ssl_certificate_key /etc/nginx/ssl/your_domain_key.pem;
    
    # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    
    # ...
    
    }
  6. Reload Nginx and check if it works by enter https://www.your_domain.com/

The post Certificate Installation: NGINX with Comodo SSL appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2015/09/certificate-installation-nginx-with-comodo-ssl.html/feed/ 0
How to install HHVM, Nginx, MariaDB in Ubuntu 14.04 LTS https://www.yinfor.com/2015/02/install-hhvm-nginx-mariadb-ubuntu-14-04-lts.html https://www.yinfor.com/2015/02/install-hhvm-nginx-mariadb-ubuntu-14-04-lts.html#comments Thu, 12 Feb 2015 02:12:07 +0000 https://www.yinfor.com/?p=4139 It is just a record for reference. 0) I have my Ubuntu 14.04 installation done on my VirtualBox 512MB memory 1 CPU. Install Ubuntu 14.04 server with openssh server only. No other server software installed. 1) Install Nginx Nginx can...

The post How to install HHVM, Nginx, MariaDB in Ubuntu 14.04 LTS appeared first on David Yin's Blog.

]]>
It is just a record for reference.

0) I have my Ubuntu 14.04 installation done on my VirtualBox

512MB memory

1 CPU.

Install Ubuntu 14.04 server with openssh server only. No other server software installed.

1) Install Nginx

Nginx can be found in the Ubuntu repository, but it is often outdated. To get the latest stable version, add the following PPA to system.

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
sudo service nginx start

The latest version of Nginx as of this post is 1.6.2.

nginx-version

Enter “http://your-ip/” into web browser see the default welcome page.

nginx-welcome

2) Install MariaDB

MariaDB is better than MySQL.

sudo apt-get install software-properties-common
sudo apt--key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main'
sudo apt-get update
sudo apt-get install mariadb-server
sudo service mysql start

Enter the root password when installation prompt it.

3) Install PHP and HHVM

Install php5-fpm as a fallback for HHVM.

First php5-fpm

sudo apt-get install php5-fpm php5-mysql php5-curl

Then install HHVM

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm

After HHVM is installed, proceed to configure it for Nginx with the command:

sudo /usr/share/hhvm/install_fastcgi.sh

Last, restart HHVM

sudo service hhvm restart

Right now the Nginx and HHVM are working together.

Put a test file under Nginx root folder.


sudo vi /var/www/html/phpinfo.php

and paste the following line:

<?php

phpinfo();

Load the url: http://your-ip/phpinfo.php and see the infomation.

phpinfo of HipHop

4) Configure sites to run in Nginx and HHVM with php5-fpm fallback

Now it is the most important part of this post. Create a virtual host to run the website.

Create a new config file that holds website detail:


sudo vi /etc/nginx/sites-available/my-site

And paste following snippet:

server {
listen 80;
listen [::]:80;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.html index.htm;

server_name mywebsite.com;
include hhvm-with-fallback.conf;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location @fallback {
# include snippets/fastcgi-php.conf;
#
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}

Server_name is the name or domain name. and root folder is the location where my web files to be served.

HHVM has some bugs of crashing occasionally without restarting itself; this will cause the website to fail with a 500 error. In this case, create a fallback system whereby php5-fpm will take over when HHVM fails. Notice the location @fallback block in the config above.  Then create the “hhvm-with-fallback.conf” file which is a modified version of the hhvm.conf file.


sudo vi /etc/nginx/hhvm-with-fallback.conf

location ~ \.(hh|php)$ {
    proxy_intercept_errors on;
    error_page 500 501 502 503 = @fallback;
 
    fastcgi_keep_conn on;
 
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

Enable this site, then test Nginx settings and restart it.


sudo nginx -t

sudo service nginx restart

The post How to install HHVM, Nginx, MariaDB in Ubuntu 14.04 LTS appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2015/02/install-hhvm-nginx-mariadb-ubuntu-14-04-lts.html/feed/ 1
Enable jpeg in PHP GD support https://www.yinfor.com/2014/05/enable-jpeg-in-php-gd-support.html https://www.yinfor.com/2014/05/enable-jpeg-in-php-gd-support.html#respond Sat, 31 May 2014 01:51:25 +0000 https://www.yinfor.com/?p=3802 I have a PHP 5.5.13 which is compiled from source. With GD support. I saw some image thumb is not shown in the webpage of Joomla. The error log has following errors: Call to undefined function: imagecreatefromjpeg() When I check...

The post Enable jpeg in PHP GD support appeared first on David Yin's Blog.

]]>
I have a PHP 5.5.13 which is compiled from source. With GD support.

I saw some image thumb is not shown in the webpage of Joomla. The error log has following errors:
Call to undefined function: imagecreatefromjpeg()

When I check the phpinfo, I saw GIF enabled, PNG enabled, WBMP enabled, XBM enabled, but jpeg is missing.
gd-without-jpeg
The screenshot above is get from inside of Joomla system information.

I checked the PHP official site. The solution is as below.

1) Make sure JPEG is installed

yum install libjpeg libjpeg-devel

2) Re-compile PHP 5.5.13
Because I make and install PHP just hours ago in the same source folder, I have to clean the folder first.

cd php-5.5.13
make clean

Then, make and install (Because it is a X86 system, or 32bit system, the lib directory is lib, jpeg-dir is /usr/lib)

./configure --prefix=/usr/local/php55 \
    --with-config-file-path=/etc/php55 \
    --with-config-file-scan-dir=/etc/php55/php.d \
    --with-libdir=lib \
    --with-mysql \
    --with-mysqli \
    --enable-mbstring \
    --disable-debug \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-gettext \
    --with-iconv \
    --with-openssl \
    --with-gd \
    --with-mcrypt \
    --with-pcre-regex \
    --with-zlib \
    --enable-cgi \
    --enable-exif \
    --enable-zip \
    --with-gmp \
    --enable-ftp \
    --enable-shmop \
    --enable-sockets \
    --with-jpeg-dir=/usr/lib
make
make install

It is just a re-compiling for PHP, nothing else changed. So restart Apache to make it effect.

gd-with-jpeg
It is from phpinfo page.

The post Enable jpeg in PHP GD support appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2014/05/enable-jpeg-in-php-gd-support.html/feed/ 0
Install XCache 3.1.0 from souce on PHP 5.4.28 https://www.yinfor.com/2014/05/install-xcache-3-1-0-from-souce-on-php-5-4-28.html https://www.yinfor.com/2014/05/install-xcache-3-1-0-from-souce-on-php-5-4-28.html#respond Mon, 26 May 2014 16:28:41 +0000 https://www.yinfor.com/?p=3778 I have a staging server. I have installed php5.3, 5.4, and 5.5 on it. Today I tried to install XCache 3.1.0 on it with PHP 5.4.28. First, I recompiled the PHP 5.4.28 with more features. So noted below: 1) Install...

The post Install XCache 3.1.0 from souce on PHP 5.4.28 appeared first on David Yin's Blog.

]]>
I have a staging server. I have installed php5.3, 5.4, and 5.5 on it. Today I tried to install XCache 3.1.0 on it with PHP 5.4.28.

First, I recompiled the PHP 5.4.28 with more features. So noted below:

1) Install additional required dev packages

yum install gmp gmp-devel

2) Compile and install php 5.4.28

cd php-5.5.12
./configure --prefix=/usr/local/php54 \
    --with-config-file-path=/etc/php54 \
    --with-config-file-scan-dir=/etc/php54/php.d \
    --with-libdir=lib64 \
    --with-mysql \
    --with-mysqli \
    --enable-mbstring \
    --disable-debug \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-gettext \
    --with-iconv \
    --with-openssl \
    --with-gd \
    --with-mcrypt \
    --with-pcre-regex \
    --with-zlib \
    --enable-cgi \
    --enable-exif \
    --enable-zip \
    --with-gmp \
    --enable-ftp \
    --enable-shmop \
    --enable-sockets
make
make install

Restart Apache

service httpd restart

Then, I start to install XCache from source, the latest version of XCache is 3.1.0.

3) Download and decompress it.

wget http://xcache.lighttpd.net/pub/Releases/3.1.0/xcache-3.1.0.tar.gz
tar -xvzf xcache-3.1.0.tar.gz

4) Compile XCache based on current PHP 5.4.28 installation

cd xcache-3.1.0
/usr/local/php54/bin/phpize
./configure --enable-xcache --with-php-config=/usr/local/php54/bin/php-config
make
make install
cp xcache.ini /etc/php54/php.d/xcache.ini
service httpd restart

Then reload the phpinfo page and get following information.

web2-php54-fastcgi-withxcache

And XCache web interface:

xcache-3.1.0-php5.4.28

The post Install XCache 3.1.0 from souce on PHP 5.4.28 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2014/05/install-xcache-3-1-0-from-souce-on-php-5-4-28.html/feed/ 0
Install Multiple Version of PHP on CentOS 6.5 as Fastcgi https://www.yinfor.com/2014/05/install-multiple-version-of-php-on-centos-6-5-as-fastcgi.html https://www.yinfor.com/2014/05/install-multiple-version-of-php-on-centos-6-5-as-fastcgi.html#comments Sat, 24 May 2014 23:11:31 +0000 https://www.yinfor.com/?p=3769 It is a guide of how to install multiple version of PHP on CentOS 6.5 64bit. All different PHP as fastcgi. It is works on Apache, one web server, each virtualhost has its own different php version support. 0) Prepare...

The post Install Multiple Version of PHP on CentOS 6.5 as Fastcgi appeared first on David Yin's Blog.

]]>
It is a guide of how to install multiple version of PHP on CentOS 6.5 64bit. All different PHP as fastcgi.
It is works on Apache, one web server, each virtualhost has its own different php version support.

0) Prepare the testing environment

Disable SELinux and stop iptables. It is for testing environment. For production machine, you should implement firewall carefully.

setenforce 0
service iptables stop

1) Enable rpmforge and epel yum repository

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

2) Install required dev packages and Apache, mod_fcgid

yum install gcc libxml2-devel bzip2-devel zlib-devel \
    curl-devel libmcrypt-devel libjpeg-devel \
    libpng-devel gd-devel mysql-devel
yum install httpd mod_fcgid 

3) Create the system startup links for Apache and start it:

chkconfig --levels 235 httpd on
/etc/init.d/httpd restart 

4) Compile and install php 5.5.12

wget http://us1.php.net/get/php-5.5.12.tar.gz/from/this/mirror
tar -xvzf mirror
cd php-5.5.12
./configure --prefix=/usr/local/php55 \
    --with-config-file-path=/etc/php55 \
    --with-config-file-scan-dir=/etc/php55/php.d \
    --with-libdir=lib64 \
    --with-mysql \
    --with-mysqli \
    --enable-mbstring \
    --disable-debug \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-gettext \
    --with-iconv \
    --with-openssl \
    --with-gd \
    --with-mcrypt \
    --with-pcre-regex \
    --with-zlib \
    --enable-cgi
make 
make install
mkdir /etc/php55
cp php.ini-production /etc/php55/php.ini

Edit php.ini

vi /etc/php55/php.ini

Add the following in the end of the file

cgi.fix_pathinfo = 1

Restart Apache

service httpd restart

5) Creating Vhosts For web1.example.com

5.1) Create user and group

groupadd web1
useradd -s /bin/false -d /var/www/web1 -m -g web1 web1
chmod 755 /var/www/web1

5.2) Then we create the document roots and make them owned by the users/groups web1:

mkdir -p /var/www/web1/web
chown web1:web1 /var/www/web1/web

5.3) We will run PHP using suExec; suExec’s document root is /var/www, as the following command shows:

[root@localhost ~]# /usr/sbin/suexec -V
 -D AP_DOC_ROOT="/var/www"
 -D AP_GID_MIN=100
 -D AP_HTTPD_USER="apache"
 -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=500
 -D AP_USERDIR_SUFFIX="public_html"

5.4) create the wrapper scripts in subdirectories of /var/www/php-fcgi-scripts

mkdir -p /var/www/php-fcgi-scripts/web1
vi /var/www/php-fcgi-scripts/web1/php-fcgi-starter

Enter following into php-fcgi-starter

#!/bin/sh
PHPRC=/etc/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/local/php55/bin/php-cgi

5.5) The php-fcgi-starter scripts must be executable, and they (and the directories they are in) must be owned by the web site’s user and group:

chmod 755 /var/www/php-fcgi-scripts/web1/php-fcgi-starter
chown -R web1:web1 /var/www/php-fcgi-scripts/web1

5.6) Create Vhost for web1.example.com

vi /etc/httpd/conf/httpd.conf
[...]
NameVirtualHost *:80

&lt;VirtualHost *:80&gt;
  ServerName web1.example.com
  DocumentRoot /var/www/web1/web/

  &lt;IfModule mod_fcgid.c&gt;
    SuexecUserGroup web1 web1
    &lt;Directory /var/www/web1/web/&gt;
      Options +ExecCGI
      AllowOverride All
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .php
      Order allow,deny
      Allow from all
    &lt;/Directory&gt;
  &lt;/IfModule&gt;

  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off

&lt;/VirtualHost&gt;

Restart Apache

service httpd restart

5.7) Now we create a small PHP test file

vi /var/www/web1/web/info.php

Add following content into it.

<?php
phpinfo();
?>

6) In Browser, you can see following infomation page.
web1-php55-fastcgi

 

7) Compile and install php 5.4.28 and php 5.3.28

Repeat the step 4, 5, and 6. Just change something respect to php 5.4.28 and php5.3.28.

7.1) php 5.4.28

http://us1.php.net/get/php-5.4.28.tar.gz/from/this/mirror

web2.example.com

/usr/local/php54

/etc/php54

user web2

group web2

web2-php54-fastcgi

 

7.2) php 5.3.28

http://us1.php.net/get/php-5.3.28.tar.gz/from/this/mirror

web3.example.com

/usr/local/php53

/etc/php53

user web3

group web3

web3-php53-fastcgi

Then, I have three hosts on the same one Apache web server at CentOS 6.5 64bit server.

Each host has its own php version installed, from 5.3 to 5.5.

So, you can use the above as a template.

The post Install Multiple Version of PHP on CentOS 6.5 as Fastcgi appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2014/05/install-multiple-version-of-php-on-centos-6-5-as-fastcgi.html/feed/ 4
Install multiple version of php on CentOS 6.5 https://www.yinfor.com/2014/05/install-multiple-version-of-php-on-centos-6-5.html https://www.yinfor.com/2014/05/install-multiple-version-of-php-on-centos-6-5.html#respond Fri, 23 May 2014 15:41:56 +0000 https://www.yinfor.com/?p=3757 This is a how-to of install php 5.3 an dphp 5.5 on one server, CentOS and use them simultaneously. It is based on CentOS 6.5, 64bit for Apache only. 1) Enable rpmforge and epel yum repository wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm rpm -ivh...

The post Install multiple version of php on CentOS 6.5 appeared first on David Yin's Blog.

]]>
This is a how-to of install php 5.3 an dphp 5.5 on one server, CentOS and use them simultaneously.

It is based on CentOS 6.5, 64bit for Apache only.

1) Enable rpmforge and epel yum repository


wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

 

2) Install php 5.3

CentOS has php 5.3 built-in-box, simply install it with yum


yum install php php-mysql php-mbstring php-mcrypt

3) Compile and install php 5.5 from source

For php 5.5, we prefer to install it from source, the point is to install php at different location, which does not conflict with the php 5.3.

PHP 5.3 is installed as an apache module, we can only use one version of php at the same time. If we need to run different version of php at the same time, fastcgi and php-fpm works on it.

Build and install php 5.5 with fpm enabled, the latest version of php 5.5 is php 5.5.12.

3.1) Install required dev packages

yum install gcc libxml2-devel bzip2-devel zlib-devel \
	curl-devel libmcrypt-devel libjpeg-devel \
	libpng-devel gd-devel mysql-devel

3.2) Compile and install


wget http://ca2.php.net/get/php-5.5.12.tar.bz2/from/this/mirror

tar -xjf mirror

cd php-5.5.12
./configure --prefix=/usr/local/php55 \
	--with-config-file-path=/etc/php55 \
	--with-config-file-scan-dir=/etc/php55/php.d \
	--enable-fpm \
	--with-fpm-user=apache \
	--with-fpm-group=apache \
	--with-libdir=lib64 \
	--with-mysql \
	--with-mysqli \
	--enable-mbstring \
	--disable-debug \
	--disable-rpath \
	--with-bz2 \
	--with-curl \
	--with-gettext \
	--with-iconv \
	--with-openssl \
	--with-gd \
	--with-mcrypt \
	--with-pcre-regex \
	--with-zlib

make -j4 && sudo make install
mkdir /etc/php55
cp php.ini-production /etc/php55/php.ini
sed -i -e 's#php_fpm_CONF=\${prefix}/etc/php-fpm.conf#php_fpm_CONF=/etc/php55/php-fpm.conf#' \
	sapi/fpm/init.d.php-fpm
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod a+x /etc/init.d/php-fpm
/sbin/chkconfig --add php-fpm
/sbin/chkconfig php-fpm on
cp sapi/fpm/php-fpm.conf /etc/php55/

3.3) Configure php-fpm
Edit /etc/php55/php-fpm.conf, change some settings. This step is mainly to uncomment some settings.

vi /etc/php55/php-fpm.conf
pid = run/php-fpm.pid
listen = 127.0.0.1:9000
pm.max_children = 20
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 15

Then, start php-fpm

/etc/init.d/php-fpm start

3.4) Install and setup mod_fastcgi

yum install libtool httpd-devel apr-devel
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
tar -xzf mod_fastcgi-current.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
make top_dir=/usr/lib64/httpd/ install
sh -c "echo 'LoadModule fastcgi_module modules/mod_fastcgi.so' > /etc/httpd/conf.d/mod_fastcgi.conf"

4) Prepare hosts and add web sites settings
4.1) Add the following line to /etc/hosts

127.0.0.1 php53.example.com php55.example.com

4.2) Create web document root and drop and index.php under it to show php information.

mkdir /var/www/fcgi-bin
for i in {1..2}; do
	web_root=/var/www/web$i
	mkdir $web_root
	echo "<?php phpinfo(); ?>" > $web_root/index.php
done

4.3) Create Apache config file(append it to httpd.conf)

vi /etc/httpd/conf/httpd.conf

Modify httpd.conf Per below

NameVirtualHost *:80

# module settings
# mod_fastcgi with php-fpm

<IfModule mod_fastcgi.c>
        FastCgiExternalServer /var/www/fcgi-bin/php-fpm -host 127.0.0.1:9000
</IfModule>

# virtual hosts...

#################################################################
#1st virtual host, use mod_php, run php-5.3.3
#################################################################
<VirtualHost *:80>
        ServerName php53.example.com
        DocumentRoot "/var/www/web1"

        <ifmodule mod_php5.c>
                <FilesMatch \.php$>
                        AddHandler php5-script .php
                </FilesMatch>
        </IfModule>

        <Directory "/var/www/web1">
                DirectoryIndex index.php index.html index.htm
                Options -Indexes FollowSymLinks
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

#################################################################
#2nd virtual host, use mod_fastcgi + php-fpm, run php-5.5.12
#################################################################
<VirtualHost *:80>
        ServerName php55.example.com
        DocumentRoot "/var/www/web2"


        <IfModule mod_fastcgi.c>
                ScriptAlias /fcgi-bin/ /var/www/fcgi-bin/
                AddHandler php5-fastcgi .php
                Action php5-fastcgi /fcgi-bin/php-fpm
        </IfModule>

        <Directory "/var/www/web2">
                DirectoryIndex index.php index.html index.htm
                Options -Indexes FollowSymLinks +ExecCGI
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

4.4) Restart apache. Visit these two sites and view phpinfo page.

service httpd restart

http://php53.example.com
php53-example
http://php55.example.com
php55-example

You can use the one of the virtual host as a template to create new virtual host.

The post Install multiple version of php on CentOS 6.5 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2014/05/install-multiple-version-of-php-on-centos-6-5.html/feed/ 0
How to install Crontab in CentOS 6.5 64bit https://www.yinfor.com/2014/04/how-to-install-crontab-in-centos-6-5-64bit.html https://www.yinfor.com/2014/04/how-to-install-crontab-in-centos-6-5-64bit.html#respond Sat, 19 Apr 2014 16:28:35 +0000 https://www.yinfor.com/?p=3615 Linode default CentOS 6.5 64bit deployment does not include Crontab or Cron Job. Here is a reference for the people like me. Install the package and dependencies #yum install vixie-cron Enable the package on boot and start # /sbin/chkconfig crond...

The post How to install Crontab in CentOS 6.5 64bit appeared first on David Yin's Blog.

]]>
Linode default CentOS 6.5 64bit deployment does not include Crontab or Cron Job. Here is a reference for the people like me.

Install the package and dependencies

#yum install vixie-cron

Enable the package on boot and start

# /sbin/chkconfig crond on
# /etc/init.d/crond start

crontab command option:

crontab: usage error: unrecognized option
usage:  crontab [-u user] file
crontab [-u user] [ -e | -l | -r ]
(default operation is replace, per 1003.2)
-e      (edit user’s crontab)
-l      (list user’s crontab)
-r      (delete user’s crontab)
-i      (prompt before deleting user’s crontab)
-s      (selinux context)

The post How to install Crontab in CentOS 6.5 64bit appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2014/04/how-to-install-crontab-in-centos-6-5-64bit.html/feed/ 0
Upgrade DIR-850L firmware to v1.09 https://www.yinfor.com/2013/11/upgrade-dir-850l-firmware-to-v1-09.html https://www.yinfor.com/2013/11/upgrade-dir-850l-firmware-to-v1-09.html#respond Mon, 04 Nov 2013 18:17:55 +0000 https://www.yinfor.com/?p=1373 My DIR-850L has firmware 1.06 now.  Yesterday, I saw 1.09 is released in September, 2013. I checked the release notes of it, below. Firmware:   v1.09   9/17/2013 NA and EU Region Revision Info: ¤ Block traffic between WAN and LAN ports during booting...

The post Upgrade DIR-850L firmware to v1.09 appeared first on David Yin's Blog.

]]>
My DIR-850L has firmware 1.06 now.  Yesterday, I saw 1.09 is released in September, 2013.

I checked the release notes of it, below.

Firmware:   v1.09   9/17/2013 NA and EU Region
Revision Info:
¤ Block traffic between WAN and LAN ports during booting
¤ Fixed UPnP security issue
¤ Improved wireless IOT issue
¤ Enhanced direct access stability with mydlink SharePort app

I would like to upgrade my router.

Download the firmware file here http://support.dlink.ca/ProductInfo.aspx?m=DIR-850L

How to upgrade the Router firmware.

1. Write the configuration settings on paper.

2. Factory reset the router using the routers web page Tools/System, is easiest, or the back button.

3. Update the router using the routers web page Tools/System using the .bin file(s) that was downloaded for your product model. The .bin files have to be unpacked from the .zip file. (Use IE and wired connection to do the update processing)

4. After the router as updated and status has reported it was successful on the routers web page. Perform one more Factory reset of the router using the routers web page Tools/System.

5. After the router has reset and come back to ready,  reconfigure the router from scratch.

 

The post Upgrade DIR-850L firmware to v1.09 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2013/11/upgrade-dir-850l-firmware-to-v1-09.html/feed/ 0