{"id":27,"date":"2008-11-25T13:00:58","date_gmt":"2008-11-25T12:00:58","guid":{"rendered":"http:\/\/spinczyk.net\/blog\/?p=27"},"modified":"2008-11-25T13:03:19","modified_gmt":"2008-11-25T12:03:19","slug":"installing-apache-mysql-and-php-on-gentoo","status":"publish","type":"post","link":"https:\/\/spinczyk.net\/blog\/2008\/11\/25\/installing-apache-mysql-and-php-on-gentoo\/","title":{"rendered":"Installing apache, mysql and php on gentoo"},"content":{"rendered":"<p>Just right now I&#8217;m setting up my new home server for various things. It&#8217;ll do all of my ranking stuff of course, since it&#8217;s very easy for me to get a new ip once G is blocking me. Right now most of the scripts are coded in python, but some essentials are still running on php (though not for long), so i need a running lamp (besides torrentflux and so on&#8230;). The last time i set up a clean server on <a title=\"Gentoo Linux\" href=\"http:\/\/www.gentoo.org\" target=\"_blank\">gentoo<\/a> is quite a few years back now. Eventhough it was a lot of fun and always a good chance to learn some things, I must admit it&#8217;s gotten quite easy now. It took me quite some time getting the new php5 running with apache a few years ago. Now theres nothing really special you need to do. Just fire up portage and install it. Before you do, you might wanna edit a few files though. First of all make sure you add <strong>mysql<\/strong> and <strong>apache2<\/strong> to your global use flags in \/etc\/make.conf, then you&#8217;ll have to think about some apache options. First of all how will the server process run on your system? Since I&#8217;ve loads of RAM and don&#8217;t really have any traffic except some requests of my one, no virtual hosts, no nothing, I&#8217;ll go with a forked apache. For further information refer to the <a href=\"http:\/\/httpd.apache.org\/docs\/2.0\/en\/mod\/prefork.html\" target=\"_blank\">apache manual<\/a>. For an forked MPM version of apache just do a quick:<\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#echo \"APACHE2_MPMS=\"prefork\" &gt;&gt; \/etc\/make.conf<\/pre>\n<\/div>\n<p>\nThere&#8217;s one thing left to do: Define what modules you want your apache to run with. As always gentoo provides a very easy way to do that. If you want to know what modules you can install just do a quick<\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#emerge --pretend --verbose --oneshot apache<\/pre>\n<\/div>\n<p>\nto see all available modules. You&#8217;ll at least want those to be installed, since they are kind of needed \ud83d\ude42<\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#echo \"APACHE2_MODULES=\"alias auth_basic auth_digest\r\nrewrite authz_host dir mime\" &gt;&gt; \/etc\/make.conf<\/pre>\n<\/div>\n<p>\nNot all of them are mandatory, but you&#8217;ll at least need to install authz_host, dir and mime for your apache to run. Now you&#8217;re ready to go, just fire up portage with a quick<\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#emerge apache<\/pre>\n<\/div>\n<p>\nNow just install php by firing up portage again, but remember to set the use flags you&#8217;ll need by updating your \/etc\/portage\/package.use, since there are quite some options&#8230; As always you can see available use flags by executing an pretended oneshot emerge of php! When you&#8217;re done, just install php by<\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#echo \"dev-lang\/php apache2 bzip2 curl exif ftp gd iconv mysql\r\nmysqli nls pcre session simplexml soap spell spl sqlite ssl\r\ntokenizer truetype unicode xml xmlrpc\" &gt;&gt; \/etc\/portage\/package.use<\/pre>\n<\/div>\n<p><\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#emerge php<\/pre>\n<\/div>\n<p>\nand you&#8217;re good to go! Just start your apache with the according init script and everything should work out of the box. You&#8217;ll probably want your apache to start automatically too, by adding it to your default runlevel:<\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#\/etc\/init.d\/apache start<\/pre>\n<\/div>\n<p><\/p>\n<div class=\"commenttext\" style=\"margin-left:20px;\">\n<pre lang=\"bash\">#rc-update add apache default<\/pre>\n<\/div>\n<p>\nBut just remember: This is a very basic installation of lamp on your system, it&#8217;ll work as it is, but you might wanna tune your settings. As always just refer to the man pages and online documentations!<\/p>\n<div style=\"float:left;margin-right:10px;\"><iframe loading=\"lazy\" height=\"69\" width=\"53\" src=\"http:\/\/widgets.fbshare.me\/files\/fbshare.php?url=https:\/\/spinczyk.net\/blog\/2008\/11\/25\/installing-apache-mysql-and-php-on-gentoo\/&title=Installing apache, mysql and php on gentoo&size=large&google_analytics=true\" frameborder=\"0\" scrolling=\"no\" allowtransparency=\"true\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>Just right now I&#8217;m setting up my new home server for various things. It&#8217;ll do all of my ranking stuff of course, since it&#8217;s very easy for me to get a new ip once G is blocking me. Right now most of the scripts are coded in python, but some essentials are still running on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18,1],"tags":[15,14,35,17,16],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/posts\/27"}],"collection":[{"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":20,"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spinczyk.net\/blog\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}