Useful Snippets

Welcome!


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Most viewed posts


Subscribe to RSS feed


Debian LAMP stack in one command

Stanislav KhromovStanislav Khromov

Start out with the basics – Apache, MySQL and PHP + extensions

apt-get install mysql-server mysql-client apache2 php5 php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc php5-xsl php5-json php5-dev libpcre3-dev

I recommend using this on Debian Jessie. That way you get a bleeding edge version of PHP (5.5.8 as of right now)

OpCode cache and APCu (Optional)

pecl install ZendOpcache-beta
pecl install apcu-beta

Add the following to /etc/php5/apache2/php.ini

zend_extension=opcache.so
extension=apcu.so

Configure Opcache by adding this to /etc/php5/apache2/php.ini

opcache.max_accelerated_files=30000
opcache.memory_consumption=160
opcache.revalidate_freq=0

Restart apache. The extensions should be available and configured. (You can verify this via phpinfo(); )

Useful tools (Optional)

apt-get install htop vim

Web Developer at Aftonbladet (Schibsted Media Group)
Any opinions on this blog are my own and do not reflect the views of my employer.
LinkedIn
Twitter
WordPress.org Profile
Visit my other blog

Comments 4
  • B-Rad
    Posted on

    B-Rad B-Rad

    Reply Author

    This is a great, man!

    Thanks so much!


  • B-Rad
    Posted on

    B-Rad B-Rad

    Reply Author

    Dude, I love have you’ve included all of the most used extensions, CURL, MD5, Crypt..

    Good job, thanks a ton.