Wednesday 16 April 2014

Install opcache for php on Fedora

OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request #1. OpCode Caches are a performance enhancing extension for PHP. They do this by injecting themselves into the execution life-cycle of PHP and caching the results of the compilation phase for later reuse. It is not uncommon to see a 3x performance increase just by enabling an OpCode cache #2.

To install on Fedora:

yum install php-opcache 

To turn on the opcache module, restart httpd service:

/bin/systemctl restart  httpd.service 

You will be able to see opcache running information in phpinfo.php.

Friday 4 April 2014

"Network error: Connection refused" on Fedora

I have just installed Fedora. When I tried to putty(ssh) in, a PuTTY fatal Error was displayed, "Network error: Connection refused".

When I check the ssh status, it said not found.


[root@F20-64 ~]# service sshd status
Redirecting to /bin/systemctl status  sshd.service
sshd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)


The openssh server was not installed on fresh Fedora.
So I install the server.

[root@F20-64 ~]# yum install openssh-server

Checking the status again:

[root@F20-64 ~]# service sshd status
Redirecting to /bin/systemctl status  sshd.service
sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled)
   Active: inactive (dead)

Enable ssh server upon restart.

[root@F20-64 ~]# chkconfig sshd on
Note: Forwarding request to 'systemctl enable sshd.service'.
ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'

Start the ssh server service.

[root@F20-64 ~]# service sshd start
Redirecting to /bin/systemctl start  sshd.service

search iomeweekly