gentoo/GENERAL.md

60 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2012-01-09 11:29:29 -05:00
#General Gentoo maintainance
## Checking for updates
Sync with Gentoo's servers, and then see what updates there are:
`emerge --sync && emerge -pv --update world`
To install available updates:
`emerge --update world`
## Starting / Restarting Services
Gentoo services have init files in the `/etc/init.d/` directory.
2012-01-09 11:39:36 -05:00
* To start a service:
2012-01-09 11:29:29 -05:00
`/etc/init.d/[service] start`
2012-01-09 11:39:36 -05:00
* To restart a service:
2012-01-09 11:29:29 -05:00
`/etc/init.d/[service] restart`
2012-01-09 11:39:36 -05:00
* To stop a service:
2012-01-09 11:29:29 -05:00
`/etc/init.d/[service] stop`
2013-06-07 12:02:14 -04:00
* To start a service on boot:
`rc-update add [service] default`
2012-01-09 11:39:36 -05:00
* Common services
2012-01-09 11:29:29 -05:00
2012-01-09 11:39:36 -05:00
`mysqld` - mysql
2013-06-07 12:02:14 -04:00
`php-fpm` - php with fpm
`nginx` - nginx web server
2012-01-09 11:39:36 -05:00
`lighttpd` - lighttpd web server
2012-01-09 11:29:29 -05:00
2012-01-09 11:39:36 -05:00
## Installing software
Generally, all there is to installing addtional software is
`emerge [software]`
But sometimes you don't know the package name, or if it exists, so you want to search:
`emerge --search [software]`
And it's a good idea to see what packages will be installed, without actually installing it
`emerge -pv [software]`
* If the sofware you are trying to install is masked, you can add the software to the `package.keywords` file in `/etc/portage/`. If the file doesn't exist, you can create it.
Each package added to the file looks like this:
`[category]/[software] ~amd64` or if you are using a 32-bit version, `[category]/[software] ~x86`
2012-01-09 13:24:59 -05:00
* If the software doesn't have the `USE` settings it needs, for example if php doesn't have mysql support, you can add this to the `package.use` file in `/etc/portage` :
2012-01-09 11:54:50 -05:00
2012-01-09 13:24:59 -05:00
`dev-lang/php mysql mysqli mysqlnd`
2012-01-09 11:29:29 -05:00