mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
20150119-2 选题
This commit is contained in:
parent
8dd8c387bd
commit
2d08d1cdd3
@ -0,0 +1,87 @@
|
|||||||
|
How to Install Cherokee Lightweight Web Server on Ubuntu 14.04
|
||||||
|
================================================================================
|
||||||
|
**Cherokee** is an free and open source high performance, lightweight, full-featured web server and running on major platform (Linux, Mac OS X, Solaris, and BSD). It is compatible with TLS/SSL,FastCGI, SCGI, PHP, uWSGI, SSI, CGI, LDAP, HTTP proxying, video streaming, content caching, traffic shaping, virtual hosts, Apache compatible log files, and load balancing.
|
||||||
|
|
||||||
|
Today we'll explains how to install and configure the Light Weight Cherokeeweb server on Ubuntu Server edition 14.04 LTS (Trusty) and should also work with 12.04, 12.10 and 13. 04, just skip the modification of source list.
|
||||||
|
|
||||||
|
Step by step install and configure the Cherokee web server on Ubuntu Server edition
|
||||||
|
|
||||||
|
### 1. Updating Ubuntu Package Index ###
|
||||||
|
|
||||||
|
First, Login into Ubuntu Server and make sure your ubuntu server update, run the following commands one by one, and install any available updates:
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
sudo apt-get upgrade
|
||||||
|
|
||||||
|
### 2. Adding PPA ###
|
||||||
|
|
||||||
|
Add the PPA cherokee webserver. by running the following commands
|
||||||
|
|
||||||
|
sudo add-apt-repository ppa:cherokee-webserver
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
Now, only for servers running Ubuntu 14.04 LTS (Trusty) follow this step below
|
||||||
|
|
||||||
|
cd /etc/apt/sources.list.d
|
||||||
|
|
||||||
|
nano cherokee-webserver-ppa-trusty.list
|
||||||
|
|
||||||
|
replace:
|
||||||
|
|
||||||
|
deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu trusty main
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu saucy main
|
||||||
|
|
||||||
|
**then again run:**
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
### 3. Installing Cherokee Web Server using apt-get ###
|
||||||
|
|
||||||
|
Enter the following command to install the Cherokee web server including Module SSL
|
||||||
|
|
||||||
|
sudo apt-get install cherokee cherokee-admin cherokee-doc libcherokee-mod-libssl libcherokee-mod-streaming libcherokee-mod-rrd
|
||||||
|
|
||||||
|
### 4. Configuring Cherokee ###
|
||||||
|
|
||||||
|
sudo service cherokee start
|
||||||
|
|
||||||
|
The best part about using its Web Server is being able to manage all of its configurations through a simple to use web interface. This interface, known as cherokee-admin, is the recommended means of administering cherokee web server through web browser. Start cherokee-admin by running the following command:
|
||||||
|
|
||||||
|
sudo cherokee-admin
|
||||||
|
|
||||||
|
**Note: The cherokee-admin will display the administration user name, One-time Password and administration web interface.**
|
||||||
|
|
||||||
|
**Note down your One-Time password. You will need this when you login to its admin web interface.**
|
||||||
|
|
||||||
|
By default, cherokee-admin can only accessed from localhost. If you need to access the admin for other network address using the parameter ‘**-b**’. If you doesn’t mention any ip address, it will automatically listen to all network interfaces. Then you can connect to cherokee-admin from other network address.
|
||||||
|
|
||||||
|
sudo cherokee-admin -b
|
||||||
|
|
||||||
|
If you need to access its admin from specific network address
|
||||||
|
|
||||||
|
sudo cherokee-admin -b 192.168.1.102
|
||||||
|
|
||||||
|
### 5. Browse your Cherokee Admin Panel ###
|
||||||
|
|
||||||
|
Now you can access the administration panel from you favorite browser by typing http://hostname_or_IP:9090/ for me its http://127.0.0.1:9090/, it will appear on your browser like this:
|
||||||
|
|
||||||
|
![cherokee-admin-panel](http://blog.linoxide.com/wp-content/uploads/2014/12/cherokee-admin.png)
|
||||||
|
|
||||||
|
Hurray, we have successfully installed and configured Cherokee Web Server in our Ubuntu Server.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: http://linoxide.com/ubuntu-how-to/install-cherokee-lightweight-web-server-ubuntu-14-04/
|
||||||
|
|
||||||
|
作者:[Arun Pyasi][a]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]:http://linoxide.com/author/arunp/
|
@ -0,0 +1,97 @@
|
|||||||
|
How to Remember and Restore Running Applications on Next Logon
|
||||||
|
================================================================================
|
||||||
|
You have made some apps running in your Ubuntu and don't want to stop the process, just managed your windows and opened your stuffs needed to work. Then, something else demands your attention or you have battery low in your machine and you have to shut down. No worries. You can have Ubuntu remember all your running applications and restore them the next time you log in.
|
||||||
|
|
||||||
|
Now, to make our Ubuntu remember the applications you have running in our current session and restore them the next time our log in, We will use the dconf-editor. This tool replaces the gconf-editor available in previous versions of Ubuntu but is not available by default. To install the dconf-editor, you need to run sudo apt-get install dconf-editor.
|
||||||
|
|
||||||
|
$ sudo apt-get install dconf-tools
|
||||||
|
|
||||||
|
Once the dconf-editor is installed, you can open dconf-editor from Application Menu. Or you can run it from terminal or run command (alt+f2):
|
||||||
|
|
||||||
|
$ dconf-editor
|
||||||
|
|
||||||
|
In the “dconf Editor” window, click the right arrow next to “org” in the left pane to expand that branch of the tree.
|
||||||
|
|
||||||
|
![Dconf Editor Apps, org](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-org-300x146.png)
|
||||||
|
|
||||||
|
Under “org”, click the right arrow next to “gnome.”
|
||||||
|
|
||||||
|
![dconf editor clicking gnome](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-gnome.png)
|
||||||
|
|
||||||
|
Under “gnome,” click “gnome-session”. In the right pane, select the “auto-save-session” check box to turn on the option.
|
||||||
|
|
||||||
|
![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png)
|
||||||
|
|
||||||
|
After you check or tick it, close the “Dconf Editor” by clicking the close button (X) in the upper-left corner of the window which is by default.
|
||||||
|
|
||||||
|
![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png)
|
||||||
|
|
||||||
|
The next time you log out and log back in, all of your running applications will be restored.
|
||||||
|
|
||||||
|
Hurray, we have successfully configured our Ubuntu 14.04 LTS "Trusty" to remember automatically running applications from our last session.
|
||||||
|
|
||||||
|
Now, on this same tutorial, we'll gonna also learn **how to enable hibernation in our Ubuntu 14.04 LTS**:
|
||||||
|
|
||||||
|
Before getting started, press Ctrl+ALt+T on your keyboard to open the terminal. When it opens, run:
|
||||||
|
|
||||||
|
sudo pm-hibernate
|
||||||
|
|
||||||
|
After your computer turns off, switch it back on. Did your open applications re-open? If hibernate doesn’t work, check if your swap partition is at least as large as your available RAM.
|
||||||
|
|
||||||
|
You can check your Swap Area Partition Size from System Monitor, you can get it from the App Menu or run command in terminal.
|
||||||
|
|
||||||
|
$ gnome-system-monitor
|
||||||
|
|
||||||
|
### Enable Hibernate in System Tray Menu: ###
|
||||||
|
|
||||||
|
The indicator-session was updated to use logind instead of upower. Hibernate is disabled by default in both upower and logind.
|
||||||
|
|
||||||
|
To re-enable hibernate, run the commands below one by one to edit the config file:
|
||||||
|
|
||||||
|
sudo -i
|
||||||
|
|
||||||
|
cd /var/lib/polkit-1/localauthority/50-local.d/
|
||||||
|
|
||||||
|
gedit com.ubuntu.enable-hibernate.pkla
|
||||||
|
|
||||||
|
**Tips: if the config file does not work for you, try another one by changing /var/lib to /etc in the code.**
|
||||||
|
|
||||||
|
Copy and paste below lines into the file and save it.
|
||||||
|
|
||||||
|
[Re-enable hibernate by default in upower]
|
||||||
|
Identity=unix-user:*
|
||||||
|
Action=org.freedesktop.upower.hibernate
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
[Re-enable hibernate by default in logind]
|
||||||
|
Identity=unix-user:*
|
||||||
|
Action=org.freedesktop.login1.hibernate
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
Restart your computer and done.
|
||||||
|
|
||||||
|
### Hibernate your laptop when lid is closed: ###
|
||||||
|
|
||||||
|
1.Edit “/etc/systemd/logind.conf” via command:
|
||||||
|
|
||||||
|
$ sudo nano /etc/systemd/logind.conf
|
||||||
|
|
||||||
|
2. Change the line **#HandleLidSwitch=suspend to HandleLidSwitch=hibernate** and save the file.
|
||||||
|
|
||||||
|
3. Run command below or just restart your computer to apply changes:
|
||||||
|
|
||||||
|
$ sudo restart systemd-logind
|
||||||
|
|
||||||
|
That’s it. Enjoy! Now, we have both dconf and hibernation on :) Now, your Ubuntu will completely remember your opened apps and stuffs.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/
|
||||||
|
|
||||||
|
作者:[Arun Pyasi][a]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]:http://linoxide.com/author/arunp/
|
Loading…
Reference in New Issue
Block a user