https://wiki.archlinux.org/api.php?action=feedcontributions&user=Jschuster&feedformat=atomArchWiki - User contributions [en]2024-03-29T13:39:50ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Subsonic&diff=800575Subsonic2024-02-16T03:41:56Z<p>Jschuster: Replace the AUR link to airsonic with airsonic-advanced-git. As noted on this page and the airsonic AUR page, airsonic is abandoned and airsonic-advanced is the current maintained fork.</p>
<hr />
<div>[[Category:Music]]<br />
[[Category:Media servers]]<br />
[[ja:Subsonic]]<br />
[http://www.subsonic.org/pages/index.jsp Subsonic] was a music server that let you store your music on one machine and play it from other machines, cell phones, via a web interface, or various other applications. It is no longer maintained. However, a maintained fork ({{AUR|airsonic-advanced-git}}) exists.<br />
<br />
== Installation ==<br />
<br />
The old, unmaintained version of {{AUR|subsonic}} is still available. In addition, as of version 6, the software was not open source. Hence it is recommended for users to instead [[install]] the open-source fork {{AUR|airsonic-advanced-git}}.<br />
<br />
== Configuration ==<br />
<br />
After performing any configuration, remember to [[restart]] {{ic|subsonic.service}}.<br />
<br />
=== Install transcoders ===<br />
<br />
By default, Subsonic uses FFmpeg to transcode videos and songs to an appropriate format and bitrate on-the-fly. After installation, you can change these defaults so that, for example, Subsonic will transcode FLAC files using FLAC and LAME instead of FFmpeg. You should therefore [[install]] the {{Pkg|ffmpeg}}, and you may also want to install {{Pkg|flac}} and {{Pkg|lame}}.<br />
<br />
For security reasons, Subsonic will not search the system for any transcoders. Instead, the user must create symlinks to the transcoders in the {{ic|/var/lib/subsonic/transcode}} folder. Create the symlinks like so:<br />
<br />
$ cd /var/lib/subsonic/transcode<br />
# for transcoder in ffmpeg flac lame; do ln -s "$(which $transcoder)"; done<br />
<br />
=== HTTPS Setup ===<br />
<br />
==== With Subsonic ====<br />
<br />
To enable HTTPS browsing and streaming, edit {{ic|/var/lib/subsonic/subsonic.sh}} and change the port from 0 to 8443:<br />
<br />
{{hc|/var/lib/subsonic/subsonic.sh|2=<br />
SUBSONIC_HTTPS_PORT=8443<br />
}}<br />
<br />
{{Note|port 8443 seems hard-coded somewhere. When attempting to change it to port 8080 it will automatically redirect the browser to port 8443 after manually accepting the invalid HTTPS certificate. You will still be able to re-navigate to port 8080 after the warning page and have it work on that port.}}<br />
<br />
==== With nginx ====<br />
<br />
If you already have multiple web services running, it might be easier to use a single SSL configuration everywhere. The following nginx configuration runs Subsonic under {{ic|<nowiki>https://example.com/subsonic</nowiki>}}:<br />
<br />
{{bc|<nowiki><br />
server {<br />
listen 443 default ssl;<br />
server_name example.com;<br />
ssl_certificate cert.pem<br />
ssl_certificate_key key.pem<br />
<br />
location /subsonic {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_set_header Host $http_host;<br />
proxy_max_temp_file_size 0;<br />
proxy_pass http://127.0.0.1:4040;<br />
proxy_redirect http:// https://;<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
To run Subsonic under a different path, you have to set the following options: <br />
<br />
{{hc|/var/lib/subsonic/subsonic.sh|2=<br />
SUBSONIC_CONTEXT_PATH=/subsonic<br />
SUBSONIC_HOST=127.0.0.1<br />
SUBSONIC_PORT=4040<br />
SUBSONIC_HTTPS_PORT=0<br />
}}<br />
<br />
==== With lighttpd ====<br />
<br />
The following configuration makes lighttpd accept HTTPS connections and proxies them to localhost. An advantage of this approach is that Subsonic does not need to be aware of SSL settings, and it can be left with default settings. This configuration is also designed to play well with the case where lighttpd is hosting multiple sites at a single IP address.<br />
<br />
{{hc|/etc/lighttpd.conf|<nowiki><br />
# Documentation at: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs<br />
# Check for errors: lighttpd -t -f /path/to/config<br />
server.modules += ("mod_proxy", "mod_redirect")<br />
server.username = "http"<br />
server.groupname = "http"<br />
server.pid-file = "/var/run/lighttpd.pid"<br />
server.errorlog = "/var/log/lighttpd/error.log"<br />
server.document-root = "/srv/http/"<br />
index-file.names = ("index.html")<br />
mimetype.assign = (<br />
".avi" => "video/x-msvideo",<br />
".css" => "text/css",<br />
".html" => "text/html",<br />
".jpg" => "image/jpeg",<br />
".log" => "text/plain",<br />
".markdown" => "text/plain",<br />
".md" => "text/plain", # markdown<br />
".mkv" => "video/x-matroska",<br />
".mp4" => "video/mp4",<br />
".nfo" => "text/plain",<br />
".png" => "image/png",<br />
".rc" => "text/plain",<br />
".rst" => "text/plain", # reStructuredText<br />
".svg" => "image/svg+xml",<br />
".txt" => "text/plain",<br />
".xml" => "application/xml",<br />
"" => "application/octet-stream"<br />
)<br />
<br />
$SERVER["socket"] == ":80" {<br />
$HTTP["host"] == "subsonic.example.com" {<br />
url.redirect = ("^/(.*)" => "https://subsonic.example.com/$1")<br />
}<br />
}<br />
<br />
$SERVER["socket"] == ":443" {<br />
# A default ssl.pemfile is required. It can be overridden in specific host<br />
# blocks. It *may* also be possible to override ssl.ca-file, but this has<br />
# not been tested.<br />
ssl.engine = "enable"<br />
ssl.use-sslv3 = "disable"<br />
ssl.ca-file = "/etc/lighttpd/ssl/GandiStandardSSLCA2.pem"<br />
ssl.pemfile = "/etc/lighttpd/ssl/subsonic.example.com.pem"<br />
<br />
$HTTP["host"] == "subsonic.example.com" {<br />
ssl.pemfile = "/etc/lighttpd/ssl/subsonic.example.com.pem"<br />
proxy.server = (<br />
# This proxying is completely transparent to clients. We load<br />
# balance requests for this path or extension...<br />
"" => (<br />
# ... among the following servers. The string naming each server<br />
# is just a label, and it has little functional impact. (It<br />
# might affect log file output?)<br />
("host" => "127.0.0.1", "port" => 4040)<br />
)<br />
)<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== FLAC playback ===<br />
<br />
The FFmpeg transcoder does not handle FLAC files well, and clients will often fail to play the resultant streams. Using FLAC and LAME instead of FFmpeg may solve this issue. This workaround requires that the FLAC and LAME transcoders have been installed, as explained in [[#Install transcoders]].<br />
<br />
Start Subsonic and go to ''settings > transcoding''. Ensure that the default FFmpeg transcoder does not get used on ''.flac'' files, then add a new entry. You will end up with something like this:<br />
<br />
{| class="wikitable"<br />
! Name !! Convert from !! Convert to !! Step 1 !! Step 2<br />
|-<br />
| mp3 default || ... NOT flac ... || mp3 || ffmpeg ... || &nbsp;<br />
|-<br />
| mp3 flac || flac || mp3 || flac --silent --decode --stdout %s || lame --silent -h -b %b -<br />
|}<br />
<br />
=== Accessing the database ===<br />
<br />
Subsonic stores all its data inside a [http://hsqldb.org/ HyperSQL] database in {{ic|/var/lib/subsonic/db}}. You can access it with a simple web interface by going to http://localhost:4040/db.view (replace with your Subsonic URL).<br />
<br />
You can also use the SQLTool command-line tool from the HyperSQL distribution, found in {{aur|hsqldb2-java}}. <br />
<br />
{{Warning|This tool cannot be run concurrently with your Subsonic instance and ''severely corrupt'' your database if misused, since newer versions of SqlTool automatically try to upgrade the database to a version that Subsonic does not support. The following assumes that you have a copy of the database in the {{ic|db.copy}} directory.}}<br />
<br />
This command can be run interactively without other arguments :<br />
<br />
{{bc|1=<br />
$ java -jar /usr/share/java/sqltool.jar --inlineRc=url=jdbc:hsqldb:file:db.copy/libresonic,user=sa,password=<br />
SqlTool v. 5337.<br />
JDBC Connection established to a HSQL Database Engine v. 2.3.3 database<br />
...<br />
sql>}}<br />
<br />
It can also run commands non-interactively. This command exports all the contents in the {{ic|MEDIA_FILE}} table :<br />
<br />
{{bc|1=<br />
$ java -jar /usr/share/java/sqltool.jar --inlineRc=url=jdbc:hsqldb:file:db.copy/libresonic,user=sa,password= - <<< '\xq MEDIA_FILE'<br />
8074 row(s) fetched from database.<br />
Wrote 3252295 characters to file 'MEDIA_FILE.csv'.}}<br />
<br />
This command exports the whole database as a SQL file :<br />
<br />
{{bc|1=<br />
$ java -jar /usr/share/java/sqltool.jar --inlineRc=url=jdbc:hsqldb:file:db.copy/libresonic,user=sa,password= - <<< "backup database to 'backup.tar' script not compressed;"<br />
1 / 1 subsonic.script...}}<br />
<br />
== Subsonic-compatible servers ==<br />
<br />
=== Libresonic/Airsonic ===<br />
<br />
Subsonic was subsequently forked as Libresonic. This was also open-source, but had removed the paid-licence checks, hence was also free [[wikipedia:Free_as_in_free_beer|as in free beer]]. However neither Subsonic nor Libresonic are maintained. The current fork continues with the name [https://github.com/airsonic-advanced/airsonic-advanced Airsonic-Advanced].<br />
<br />
=== Madsonic ===<br />
<br />
{{AUR|madsonic}} is a (non-free) fork of Subsonic with extra features.<br />
<br />
Once you start the server, pay close attention to the Transcoding options, as you will probably have to change the command from "Audioffmpeg" to "ffmpeg".<br />
<br />
=== Gonic ===<br />
<br />
{{AUR|gonic}} is a lightweight music streaming server which implements the Subsonic API<br />
<br />
=== Navidrome ===<br />
<br />
{{Pkg|navidrome}} is also a modern and good alternative music server which implements the Subsonic API. It is written in Go and it works on a variety of platforms including Raspberry PIs [https://www.navidrome.org/].<br />
<br />
== Clients ==<br />
<br />
=== Sonixd ===<br />
<br />
{{AUR|sonixd}} is a cross platform, desktop Subsonic API client player<br />
<br />
=== Strawberry Music Player ===<br />
<br />
{{pkg|strawberry}} has the ability to playback music from Subsonic API servers<br />
<br />
=== Sublime Music ===<br />
<br />
{{AUR|sublime-music}} is a native, graphical Subsonic client.<br />
<br />
== See also ==<br />
<br />
* [http://www.subsonic.org Official web site]</div>Jschusterhttps://wiki.archlinux.org/index.php?title=Wordpress&diff=462156Wordpress2017-01-10T02:12:28Z<p>Jschuster: Added note on how to update using SSH SFTP Updated Support plugin</p>
<hr />
<div>[[Category:Web server]]<br />
[[ja:Wordpress]]<br />
{{Related articles start}}<br />
{{Related|Apache HTTP Server}}<br />
{{Related|PHP}}<br />
{{Related|MySQL}}<br />
{{Related|phpMyAdmin}}<br />
{{Related articles end}}<br />
<br />
[http://wordpress.org WordPress] is a free and open source content management system ([[Wikipedia:Content management system|CMS]]) created by [[Wikipedia:Matt Mullenweg|Matt Mullenweg]] and first released in 2003. WordPress has a vast and vibrant community that provides tens of thousands of free plugins and themes to allow the user to easily customize the appearance and function of their WordPress CMS. WordPress is licensed under the GPLv2.<br />
<br />
The biggest feature of WordPress is its ease in configuration and administration. [http://codex.wordpress.org/Installing_WordPress Setting up a WordPress site takes five minutes]. The WordPress administration panel allows users to easily configure almost every aspect of their website including fetching and installing plugins and themes. WordPress provides effortless automatic updates.<br />
<br />
== Installation ==<br />
<br />
WordPress requires [[PHP]] and [[MySQL]] to be installed and configured. See the [[LAMP]] wiki article for more information. During configuration, be aware that some WordPress features require [http://wordpress.stackexchange.com/questions/42098/what-are-php-extensions-and-libraries-wp-needs-and-or-uses PHP extensions] that may not be turned on by default.<br />
<br />
=== Installation using pacman ===<br />
<br />
[[Install]] the {{pkg|wordpress}} package.<br />
<br />
{{warning|While it is easier to let pacman manage updating your WordPress install, this is not necessary. WordPress has functionality built-in for managing updates, themes, and plugins. If you decide to install the official community package, you will not be able to install plugins and themes using the WordPress admin panel without a needlessly complex permissions setup, or logging into FTP as root. pacman does not delete the WordPress install directory when uninstalling it from your system regardless of whether or not you have added data to the directory manually or otherwise.}}<br />
<br />
=== Manual install ===<br />
<br />
Go to [http://wordpress.org/download/ wordpress.org] and download the latest version of WordPress and extract it to your webserver directory. Give the directory enough permissions to allow your FTP user to write to the directory (used by WordPress).<br />
<br />
cd /srv/http/''whatever''<br />
wget <nowiki>https://wordpress.org/latest.tar.gz</nowiki><br />
tar xvzf latest.tar.gz<br />
<br />
== Configuration ==<br />
<br />
The configuration method used here assumes you are using WordPress on a local network.<br />
<br />
=== Host config ===<br />
<br />
Make sure your {{ic|/etc/hosts}} file is setup correctly. This will be important when accessing your WordPress CMS from a local network. Your {{ic|/etc/hosts}} file should look something like the following,<br />
<br />
{{bc|#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 lithium.kaboodle.net localhost lithium<br />
::1 lithium.kaboodle.net localhost lithium}}<br />
<br />
{{note|You will need to use a proxy server to access your WordPress installation from mobile devices if you plan on using hostnames to install WordPress, otherwise your website will appear broken [[#Appearance is broken (no styling)]].}}<br />
<br />
=== Configure apache ===<br />
<br />
{{note|You will need [[Apache]] configured to run with [[PHP]] and [[MySQL]]. Check [[LAMP#PHP]] and [[LAMP#MySQL.2FMariaDB|LAMP#MySQL/MariaDB]] sections for instructions.}}<br />
<br />
You will need to create a config file for apache to find your WordPress install. Create the following file and edit it your favorite text editor:<br />
<br />
{{hc|# /etc/httpd/conf/extra/httpd-wordpress.conf|<br />
Alias /wordpress "/usr/share/webapps/wordpress"<br />
<Directory "/usr/share/webapps/wordpress"><br />
AllowOverride All<br />
Options FollowSymlinks<br />
Require all granted<br />
</Directory>}}<br />
<br />
Change {{ic|/wordpress}} in the first line to whatever you want. For example, {{ic|/myblog}} would require that you navigate to {{ic|http://hostname/myblog}} to see your WordPress website.<br />
<br />
Also change the paths to your WordPress install folder in case you did a manual install. Do not forget to append the parent directory to the {{ic|php_admin_value}} variable as well as shown below.<br />
<br />
{{hc|# /etc/httpd/conf/extra/httpd-wordpress.conf|<br />
Alias /myblog "/mnt/data/srv/wordpress"<br />
<Directory "/mnt/data/srv/wordpress"><br />
AllowOverride All<br />
Options FollowSymlinks<br />
Require all granted<br />
</Directory>}}<br />
<br />
Next edit the [[Apache]] configuration file and add the following:<br />
<br />
{{hc|# /etc/httpd/conf/httpd.conf|<br />
Include conf/extra/httpd-wordpress.conf<br />
}}<br />
<br />
Now restart {{ic|httpd.service}} (Apache) using [[systemd#Using units|systemd]].<br />
<br />
=== Configure MySQL ===<br />
<br />
MySQL can be configured using a plethora of tools, but the most common are the command-line or [http://www.phpmyadmin.net/home_page/index.php phpMyAdmin].<br />
<br />
{{Tip|Make sure MariaDB is installed and configured correctly. At a minimum, follow the [[MySQL#Installation|installation instructions]] for Arch Linux.}}<br />
<br />
==== Using MariaDB command-line tool ====<br />
<br />
First, login as root. You will be asked for your MariaDB root password:<br />
<br />
$ mysql -u root -p<br />
<br />
Then create a user and database:<br />
{{Note|{{ic|wordpress}} is your Database Name and {{ic|wp-user}} is your User Name. You can change them if you wish. Also replace {{ic|choose_db_password}} with your new Password for this database. You will be asked for these values along with {{ic|localhost}} in the next section.}} <br />
<br />
{{bc|MariaDB> CREATE DATABASE wordpress;<br />
MariaDB> GRANT ALL PRIVILEGES ON wordpress.* TO "wp-user"@"localhost" IDENTIFIED BY "choose_db_password";<br />
MariaDB> FLUSH PRIVILEGES;<br />
MariaDB> EXIT}}<br />
<br />
See WordPress.org [https://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client official instructions] for details.<br />
<br />
==== Using phpMyAdmin ====<br />
<br />
See [[phpMyAdmin]] to install and configure phpMyAdmin.<br />
<br />
In your web browser, navigate to your phpMyAdmin host and perform the following<br />
steps:<br />
<br />
# Login to phpMyAdmin.<br />
# Click "user" and then click "Add user".<br />
# Give the pop up window a name and a password.<br />
# Select "Create database with same name and grant all privileges".<br />
# Click the "Add user" button to create the user.<br />
<br />
== WordPress Installation ==<br />
<br />
Once you have spent a couple of hours setting up your http server, php, and mysql, it is finally time to let WordPress have its five minutes and install itself. So let us begin.<br />
<br />
The WordPress installation procedure will use the URL in the address field of your web browser as the default website URL. If you have navigated to http://localhost/wordpress, your website will be accessible from your local network, but it will be broken in appearance and function.<br />
<br />
# Navigate to {{ic|http://hostname/wordpress}}.<br />
# Click the "Create a Configuration File" button.<br />
# Click the "Let's go!" button.<br />
# Fill in you database information created in the previous section<br />
# Click "Submit".<br />
<br />
If you installed WordPress from the Official repository, then this setup procedure will not have the correct permissions to create the wp-config.php file used by WordPress. You will have to do this step yourself as root using information WordPress will provide.<br />
<br />
A page will appear saying WordPress can not write the wp-config.php file. Copy the text in the edit box and open {{ic|/usr/share/webapps/wordpress/wp-config.php}} as root in your text editor. Paste the copied text into the editor and save the file.<br />
<br />
After that, you will have to change permissions of the /usr/share/webapps/wordpress/ and all the files inside it to user {{ic|http}} and group {{ic|http}} by using chown so that the webserver can access it.<br />
<br />
Finally, Click "Run the install" and WordPress will populate the database with your information. Once complete, you will be shown "Success!" page. Click the login button to finish your installation.<br />
<br />
Now would be a good time to access your website from all your devices to be sure your WordPress installation is setup correctly.<br />
<br />
== Usage ==<br />
<br />
=== Installing a theme ===<br />
<br />
==== Finding new themes ====<br />
<br />
There are tens of thousands of themes available for WordPress. Searching on google for a good theme can be like wading through a river filled with trash. Good places for looking for themes include:<br />
<br />
* [https://wordpress.org/themes/ Official WordPress theme website]<br />
* [http://www.smashingmagazine.com/ Smashing Magazine]<br />
* [http://thethemefoundry.com/ The Theme Factory]<br />
* [http://www.woothemes.com/ Woo Themes]<br />
<br />
{{Tip|One can use WordPress' admin interface to install plugins and themes. To do this, make the user that serves WordPress the [[File_permissions_and_attributes#Changing_permissions|owner]] of your WordPress directory. For [[Apache_HTTP_Server#Advanced_options|Apache]] this user is normally http.}}<br />
<br />
==== Install using the admin panel ====<br />
<br />
Before installing a theme using the admin panel, you will need to setup an [[Very_Secure_FTP_Daemon|FTP]] server on your WordPress host. To maintain a high level of protection, you might set up a [[user]] on your system specifically for WordPress, give it the home directory of {{ic|<path to your WordPress install>/wp-content}}, disallow anonymous login, and allow no more users to log in than for WordPress (and obviously others as required by your setup).<br />
<br />
Once the FTP server is setup, login to your WordPress installation and click <nowiki>"Appearance->Install Themes->Upload"</nowiki>. From there select your zip file that contains your theme and click "Install Now". You will be presented with a box asking for FTP information, enter it and click "Proceed". You might need to update [[chown|file ownership]] and [[chmod|rights]] if WordPress reports that it is unable to write to the directory. If you have been following along closely, you should now have an installed theme. Activate it if you wish.<br />
<br />
==== Install manually ====<br />
<br />
Download the archive and extract into the '''wp-content/themes''' folder<br />
<br />
# Example for a theme named "MyTheme"<br />
cd /path/to/wordpress/root/directory<br />
cd wp-content/themes<br />
<br />
# get the theme archive and extract<br />
wget <nowiki>http://www.example.com/MyTheme.zip</nowiki><br />
unzip MyTheme.zip<br />
<br />
# remove the archive (optional)<br />
rm MyTheme.zip<br />
<br />
Be sure to follow any additional instructions as provided by the theme author.<br />
<br />
Select your new theme from the theme chooser (<nowiki>"Appearance->Themes"</nowiki>)<br />
<br />
=== Installing a plugin ===<br />
<br />
The steps for installing a plugin are the same as they are for installing a theme. Just click the "Plugins" link in the left navigation bar and follow the steps.<br />
<br />
=== Updating ===<br />
<br />
Every now and then when you log into wordpress there will be a notification informing you of updates. If you have correctly installed and configured an FTP client, and have the correct filesystem permissions to write in the WordPress install path then you should be able to perform updates at the click of a button. Just follow the steps.<br />
<br />
Alternatively, you can use SSH to update your installation with the [https://wordpress.org/plugins/ssh-sftp-updater-support/ SSH SFTP Updater Support plugin].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Appearance is broken (no styling) ===<br />
<br />
Your WordPress website will appear to have no styling to it when viewing it in a web browser (desktop or mobile) that does not have its hostnames mapped to ip addresses correctly.<br />
<br />
This occurs because you used a url with the hostname of your server, instead of an ip address, when doing the initial setup and WordPress has used this as the default website URL.<br />
<br />
To fix this, you will either need to edit your /etc/hosts file or setup a proxy server. For an easy to setup proxy server, see [[Polipo]], or if you want something with a little more configuration, see [[Squid]].<br />
<br />
Another option is changing a value in the database table of your WordPress, specifically the wp_options table. The fix is to change the siteurl option to point directly to the domain name and not "localhost".<br />
<br />
== Tips and tricks ==<br />
<br />
== See also ==<br />
* [[Wikipedia:WordPress|WordPress]]<br />
* [[Wikipedia:Content management system|Content management system]]</div>Jschusterhttps://wiki.archlinux.org/index.php?title=Jinzora&diff=349778Jinzora2014-12-13T16:41:07Z<p>Jschuster: Fix whitespace at top of page</p>
<hr />
<div>[[Category:Audio/Video]] <br />
[http://en.jinzora.com/ Jinzora] is a GPL web based multimedia application. It serves as a streaming server as well as a media management platform. This article will show you how to install and configure Jinzora.<br />
<br />
==Installation==<br />
Jinzora can run in two modes, ''streaming'' and using ''mpd''. If you have not installed MPD already, follow the wiki guide: [[mpd]] (It is not required for the streaming mode to operate)<br />
<br />
===Setup the webserver===<br />
Follow the wiki tutorial for installing Apache, PHP and MySQL: [[LAMP]]<br />
<br />
(Note: Installing phpMyAdmin from the above guide is optional; if you are ever likely to make your own website that will use PHP and MySQL, I would suggest you install it. Otherwise you probably will not need it).<br />
<br />
===Configure PHP===<br />
Jinzora can make use of the GD and iconv library. It is recommend you enable these.<br />
Uncomment gd.so and iconv.so in {{ic|/etc/php/php.ini}}.<br />
extension=gd.so<br />
extension=iconv.so<br />
<br />
The PHP gd extension requires the gd library to be installed:<br />
# pacman -S php-gd<br />
<br />
Also take a look at the open_basedir setting. Your media directory should be or below the paths specified in this directory.<br />
<br />
===Download and extract Jinzora===<br />
Download the latest version of Jinzora2 from http://en.jinzora.com/download and extract the contents using [[tar]]:<br />
<pre><br />
# wget http://get.jinzora.com/jz2current.tar.gz<br />
# tar -xvf jz2current.tar.gz<br />
</pre><br />
<br />
==Configuring Jinzora==<br />
In the {{ic|~/httpd/html/jinzora2}} directory, run configure.sh<br />
# sh configure.sh<br />
<br />
===Run the installer===<br />
The installer will automatically configure Jinzora and create the database. Open up your web browser, go to http://localhost/jinzora2/index.php and follow the instructions<br />
<br />
* Pay attention to these setup steps:<br />
** '''Page 4 - Installation Type :''' Change from 'Streaming' to 'Streaming & Jukebox' if you wish to listen to the music on the computer you are installing Jinzora2 on (it is primarily a streaming application to allow remote access to, and control of, a streaming server running it).<br />
** '''Page 5 - Main Settings :''' If you hover over the boxes here they explain the settings, so choose whatever you want. It is best to choose 'Database' for Backend Type. Also consider using the 'Tag Data' option for 'Data Structure', unless your music is organized on your filesystem exactly the way you want it to be.<br />
** '''Page 6 - Backend Setup :''' Unless you have used Jinzora before, or for some reason wish to manually create a MySQL database for it to use, then select 'True' under 'Create Database'.<br />
** '''Page 7 - Import Media :''' This step may take a few minutes if you have got a few gigs of music; simply enter into the box the directory where your music is stored. When the installer's finished importing the music from this directory, you will have the option to import as many other directories as you want, one after the other. <br />
<br />
You can also import more files from the '''Settings''' interface when Jinzora is up and running. You do not have to do it while installing.<br />
<br />
'''Note:''' While Jinzora was importing my music collection, I had the following error appear twice on the page:<br />
<br />
<pre>Warning: strpos() [function.strpos]: Offset not contained in string. in /home/httpd/html/jinzora2/services/services/tagdata/getid3/module.tag.id3v2.php<br />
on line 1542</pre><br />
<br />
This seemed to have no adverse effect on the installation though, so if something similar happens to you, do not worry!<br />
<br />
===Save the configuration===<br />
When you have finished importing your music, click '''Proceed to save config''', then '''Proceed to launch Jinzora'''.<br />
<br />
===Setting up MPD to play your music===<br />
Edit {{ic|~/httpd/html/jinzora2/jukebox/settings.php}}: under 'Description', change 'Winamp Media Player' to 'Music Player Daemon' (or whatever you want), and under 'type' change 'winamp3' to 'mpd'.<br />
<br />
Change 'password' to be empty (so it just reads <nowiki>''</nowiki> rather than 'jinzora'), or change this to whatever password you have set in {{ic|/etc/mpd.conf}}.<br />
<br />
Also in this file, change the port from '4800' to '6600', or whatever port you have set MPD to accept connections on in {{ic|/etc/mpd.conf}}.<br />
<br />
If you wish to use Jinzora's streaming functionality, simply go back to your webbrowser, click refresh, select 'Music Player Daemon' from the 'Playback To' dropdown menu and Voila! Your own working copy of Jinzora !<br />
<br />
==Troubleshooting==<br />
* If you cannot get any sound despite all of the above, try testing mpd with another GUI client (Glurp is a nice simple one - do {{Ic|pacman -S glurp}}, add a track to its playlist and try to play it). If you have no sound in this either, you need to further edit {{ic|/etc/mpd.conf}}. Try uncommenting some of the ALSA settings in this file (assuming you use ALSA).<br />
<br />
* If you know that MPD ''is'' working, then try to match up the settings in Jinzora as closely to those in {{ic|/etc/mpd.conf}} as possible (the settings in Jinzora are accessed from the 4th small green button on the upper left of the 'Slick' interface).<br />
<br />
* If changes to your playlist are ignored, go to System Tools -> Settings Manager -> Main Settings/Playlist and set 'use_ext_playlists' to 'false'.<br />
<br />
* If when you click on the PLAY button of any song / album you are offered a 'playlist.m3u' download, then you have not changed the 'Playback To' option to 'Music Player Daemon'.</div>Jschusterhttps://wiki.archlinux.org/index.php?title=Wordpress&diff=307843Wordpress2014-03-31T23:37:30Z<p>Jschuster: Added note about plugins for mysqli and pdo_mysql</p>
<hr />
<div>[[Category:Web Server]]<br />
{{Related articles start}}<br />
{{Related|LAMP}}<br />
{{Related|PHP}}<br />
{{Related|MySQL}}<br />
{{Related|phpMyAdmin}}<br />
{{Related articles end}}<br />
<br />
[http://wordpress.org Wordpress] is a free and open source content management system ([[Wikipedia:Content management system|CMS]]) created by [[Wikipedia:Matt Mullenweg|Matt Mullenweg]] and first released in 2003. Wordpress has a vast and vibrant community that provides tens of thousands of free plugins and themes to allow the user to easily customize the appearance and function of their Wordpress CMS. Wordpress is licensed under the GPLv2.<br />
<br />
The biggest feature of Wordpress is its ease in configuration and administration. [http://codex.wordpress.org/Installing_WordPress Setting up a Wordpress site takes five minutes]. The Wordpress administration panel allows users to easily configure almost every aspect of their website including fetching and installing plugins and themes. Wordpress provides effortless automatic updates.<br />
<br />
== Installation ==<br />
<br />
Wordpress requires [[PHP]] and [[MySQL]] to be installed and configured. See the [[LAMP]] wiki article for more information. During configuation, be aware that some WordPress features require [http://wordpress.stackexchange.com/questions/42098/what-are-php-extensions-and-libraries-wp-needs-and-or-uses PHP extensions] that may not be turned on by default.<br />
<br />
{{note|As of August 2012, this article does not support using Wordpress with PostrgreSQL. Wordpress was designed to be used with mysql only. It is possible to use Wordpress with other databases such as PostgreSQL, through the use of a [http://wordpress.org/extend/plugins/postgresql-for-wordpress/ plugin] and a bit of work.}}<br />
<br />
=== Installation using pacman ===<br />
<br />
[[pacman|Install]] {{pkg|wordpress}} from the [[official repositories]].<br />
<br />
{{warning|While it is easier to let pacman manage updating your Wordpress install, this is not necessary. Wordpress has functionality built-in for managing updates, themes, and plugins. If you decide to install the official community package, you will not be able to install plugins and themes using the Wordpress admin panel without a needlessly complex permissions setup, or logging into FTP as root. pacman does not delete the Wordpress install directory when uninstalling it from your system regardless of whether or not you have added data to the directory manually or otherwise.}}<br />
<br />
=== Manual install ===<br />
<br />
Go to [http://wordpress.org/download/ wordpress.org] and download the latest version of Wordpress and extract it to your webserver directory. Give the directory enough permissions to allow your FTP user to write to the directory (used by Wordpress).<br />
<br />
cd /srv/http/whatever<br />
wget https://wordpress.org/latest.tar.gz<br />
tar xvzf latest.tar.gz<br />
<br />
== Configuration ==<br />
<br />
The configuration method used here assumes you are using Wordpress on a local network.<br />
<br />
=== Host config ===<br />
<br />
Make sure your {{ic|/etc/hosts}} file is setup correctly. This will be important when accessing your Wordpress CMS from a local network. Your {{ic|/etc/hosts}} file should look something like the following,<br />
<br />
{{bc|#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 lithium.kaboodle.net localhost lithium<br />
::1 lithium.kaboodle.net localhost lithium}}<br />
<br />
{{note|You will need to use a proxy server to access your Wordpress installation from mobile devices if you plan on using hostnames to install Wordpress, otherwise your website will appear broken [[#Appearance is broken (no styling)]].}}<br />
<br />
=== Configure apache ===<br />
<br />
{{note|You will need to have [[Apache]] configured to run with [[PHP]]. Check the [[LAMP#PHP]] page for instructions. Make sure to enable the {{ic|mysql.so}} extension.}}<br />
<br />
You will need to create a config file for apache to find your Wordpress install. Create the following file and edit it your favorite text editor:<br />
<br />
{{hc|# /etc/httpd/conf/extra/httpd-wordpress.conf|<br />
Alias /wordpress "/usr/share/webapps/wordpress"<br />
<Directory "/usr/share/webapps/wordpress"><br />
AllowOverride All<br />
Options FollowSymlinks<br />
Order allow,deny<br />
Allow from all<br />
php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:$"<br />
</Directory>}}<br />
<br />
Change {{ic|/wordpress}} in the first line to whatever you want. For example, {{ic|/myblog}} would require that you navigate to {{ic|http://hostname/myblog}} to see your Wordpress website.<br />
<br />
Also change the paths to your Wordpress install folder in case you did a manual install. Don't forget to append the parent directory to the {{ic|php_admin_value}} variable as well as shown below.<br />
<br />
{{hc|# /etc/httpd/conf/extra/httpd-wordpress.conf|<br />
Alias /myblog "/mnt/data/srv/wordpress"<br />
<Directory "/mnt/data/srv/wordpress"><br />
AllowOverride All<br />
Options FollowSymlinks<br />
Order allow,deny<br />
Allow from all<br />
php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/mnt/data/srv:$"<br />
</Directory>}}<br />
<br />
Next edit the apache config file and add the following:<br />
<br />
{{hc|# /etc/httpd/conf/httpd.conf|<br />
...<br />
Include conf/extra/httpd-wordpress.conf<br />
...<br />
}}<br />
<br />
Now [[Daemons#Restarting|restart]] httpd (Apache).<br />
<br />
=== Configure MySQL ===<br />
<br />
MySQL can be configured using a plethora of tools, but the most common are the command line or [http://www.phpmyadmin.net/home_page/index.php phpMyAdmin].<br />
<br />
==== Using phpMyAdmin ====<br />
<br />
See [[phpMyAdmin]] to install and configure phpMyAdmin.<br />
<br />
In your web browser, navigate to your phpMyAdmin host and perform the following<br />
steps:<br />
<br />
# Login to phpMyAdmin.<br />
# Click "user" and then click "Add user".<br />
# Give the pop up window a name and a password.<br />
# Select "Create database with same name and grant all privileges".<br />
# Click the "Add user" button to create the user.<br />
<br />
== Wordpress Installation ==<br />
<br />
Once you have spent a couple of hours setting up your http server, php, and mysql, it is finally time to let Wordpress have its five minutes and install itself. So let us begin.<br />
<br />
{{note|If you have disabled the mysql.so PHP extension as recommended on the [[LAMP]] page and are using mysqli.so or pdo_mysql.so instead, you will most likely need a Wordpress plugin to use those APIs. A plugin for mysqli can be found at https://wordpress.org/plugins/mysqli/.}}<br />
<br />
The Wordpress installation procedure will use the URL in the address field of your web browser as the default website URL. If you have navigated to http://localhost/wordpress, your website will be accessible from your local network, but it will be broken in appearance and function.<br />
<br />
# Navigate to {{ic|http://hostname/wordpress}}.<br />
# Click the "Create a Configuration File" button.<br />
# Click the "Let's go!" button.<br />
# Fill in you database information created in the previous section<br />
# Click "Submit".<br />
<br />
If you installed Wordpress from the Official repository, then this setup procedure will not have the correct permissions to create the wp-config.php file used by Wordpress. You will have to do this step yourself as root using information Wordpress will provide.<br />
<br />
A page will appear saying Wordpress can not write the wp-config.php file. Copy the text in the edit box and open {{ic|/usr/share/webapps/wordpress/wp-config.php}} as root in your text editor. Paste the copied text into the editor and save the file.<br />
<br />
Finally, Click "Run the install" and Wordpress will populate the database with your information. Once complete, you will be shown "Success!" page. Click the login button to finish your installation.<br />
<br />
Now would be a good time to access your website from all your devices to be sure your Wordpress installation is setup correctly.<br />
<br />
== Usage ==<br />
<br />
=== Installing a theme ===<br />
<br />
There are tens of thousands of themes available for Wordpress. Searching on google for a good theme can be like wading through a river filled with trash. Good places for looking for themes include [http://www.smashingmagazine.com/ Smashing Magazine] and the [http://wordpress.org/extend/themes/ official Wordpress theme website]. There is also pay for theme sites like [http://www.woothemes.com/ Woo Themes] and [http://thethemefoundry.com/ The Theme Factory].<br />
<br />
==== Using the admin panel ====<br />
<br />
Before installing a theme using the admin panel, you will need to setup an [https://wiki.archlinux.org/index.php/Very_Secure_FTP_Daemon FTP] server on your Wordpress host.<br />
<br />
Once the FTP server is setup, login to your Wordpress installation and click <nowiki>"Appearance->Install Themes->Upload"</nowiki>. From there select your zip file that contains your theme and click "Install Now". You will be presented with a box asking for FTP information, enter it and click "Proceed". If you have been following along closely, you should now have an installed theme. Activate it if you wish.<br />
<br />
=== Installing a plugin ===<br />
<br />
The steps for installing a plugin are the same as they are for installing a theme. Just click the "Plugins" link in the left navigation bar and follow the steps. Wordpress is very easy to use.<br />
<br />
=== Updating ===<br />
<br />
Every now and then when you log into wordpress there will be a notification informing you of updates. If you have correctly installed and configured an FTP client, and have the correct filesystem permissions to write in the Wordpress install path then you should be able to perform updates at the click of a button. Just follow the steps.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Appearance is broken (no styling) ===<br />
<br />
Your Wordpress website will appear to have no styling to it when viewing it in a web browser (desktop or mobile) that does not have its hostnames mapped to ip addresses correctly.<br />
<br />
This occurs because you used a url with the hostname of your server, instead of an ip address, when doing the initial setup and Wordpress has used this as the default website URL.<br />
<br />
To fix this, you will either need to edit your /etc/hosts file or setup a proxy server. For an easy to setup proxy server, see [[Polipo]], or if you want something with a little more configuration, see [[Squid]].<br />
<br />
Another option is changing a value in the database table of your Wordpress, specifically the wp_options table. The fix is to change the siteurl option to point directly to the domain name and not "localhost".<br />
<br />
== Tips and tricks ==<br />
<br />
== See also ==<br />
* [[Wikipedia:WordPress|Wordpress]]<br />
* [[Wikipedia:Content management system|Content management system]]</div>Jschusterhttps://wiki.archlinux.org/index.php?title=MediaWiki&diff=236056MediaWiki2012-11-20T03:04:26Z<p>Jschuster: Added note to add /usr/share/webapps to php.ini's open_basedir setting</p>
<hr />
<div>[[Category:Web Server]]<br />
{{Note| If you are using xampp, there are different steps you need to take after installing. More info [https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_XAMPP#381 here] }}<br />
== Installation ==<br />
[[pacman|Install]] {{pkg|php-apache}}, {{pkg|php-intl}}, {{pkg|imagemagick}}, {{pkg|mysql}} (or {{pkg|postgresql}} and {{pkg|php-pgsql}}, see [[Postgresql]] for more details) and {{pkg|mediawiki}}, all available from the [[official repositories]].<br />
<br />
Instead of {{pkg|imagemagick}} you can install {{pkg|php-gd}}. Also instead of {{pkg|mysql}} you can install {{pkg|sqlite3}} or {{pkg|postgresql}}.<br />
<br />
==Configuration==<br />
<br />
Create {{ic|/etc/webapps/mediawiki/httpd-mediawiki.conf}} from the provided example {{ic|apache.example.conf}} in the same directory.<br />
<br />
*Add the following lines to {{ic|/etc/httpd/conf/httpd.conf}}<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
Include /etc/webapps/mediawiki/httpd-mediawiki.conf<br />
* Adjust the open_basedir in {{ic|httpd-mediawiki.conf}} to include the webapps directory.<br />
php_admin_value open_basedir "/usr/share/webapps/:/temp/:/usr/bin"<br />
* Also adjust the open_basedir in {{ic|/etc/php/php.ini}} to include the webapps directory (allows update.php to be run from the command line):<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/<br />
<br />
Adjust permissions in {{ic|/usr/share/webapps/mediawiki/.htaccess}}<br />
<br />
Restart apache with:<br />
# rc.d restart httpd<br />
<br />
== Nginx ==<br />
To get MediaWiki working with Nginx, create the following file at {{ic|/etc/nginx/mediawiki.conf}}:<br />
<br />
location / {<br />
index index.php;<br />
try_files $uri @mediawiki;<br />
}<br />
location @mediawiki {<br />
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1$2 last;<br />
}<br />
location ~ \.php?$ {<br />
include fastcgi.conf;<br />
fastcgi_pass php;<br />
}<br />
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {<br />
try_files $uri /index.php;<br />
expires max;<br />
log_not_found off;<br />
}<br />
location ^~ /maintenance/ {<br />
return 403;<br />
}<br />
location ^~ /cache/ {<br />
deny all;<br />
}<br />
<br />
Ensure that {{ic|php-fpm}} is installed, and in your {{ic|/etc/nginx/nginx.conf}} file, ensure that you have an {{ic|upstream}} directive named {{ic|php}}, similar to this one:<br />
<br />
upstream php {<br />
server unix:/var/run/php-fpm/php-fpm.sock;<br />
}<br />
<br />
Include a server directive, similar to this, in your {{ic|/etc/nginx/nginx.conf}} file:<br />
<br />
server {<br />
listen 80;<br />
server_name mediawiki;<br />
root /usr/share/webapps/mediawiki;<br />
index index.php;<br />
include mediawiki.conf;<br />
}<br />
<br />
Finally, ensure that the {{ic|open_basedir}} directive in {{ic|/etc/php/php.ini}} includes {{ic|/usr/share/webapps}} and {{ic|/etc/webapps}}, or you might get "File not found" or "No input file specified" errors.<br />
<br />
== Tips ==<br />
=== Mathematics (texvc) ===<br />
<br />
Usually installing texvc package and enabling it in config are enough:<br />
$wgUseTeX = true;<br />
<br />
If you get problems, try to increase limits for shell commands:<br />
$wgMaxShellMemory = 8000000;<br />
$wgMaxShellFileSize = 1000000;<br />
$wgMaxShellTime = 300;<br />
<br />
=== Unicode ===<br />
<br />
Check that php, apache and mysql uses UTF-8. Otherwise you may face strange bugs because of encoding mismatch.</div>Jschusterhttps://wiki.archlinux.org/index.php?title=MediaWiki&diff=236051MediaWiki2012-11-20T02:46:04Z<p>Jschuster: Removed section about adding directory section to httpd.conf, since that content is included in the default httpd-mediawiki.conf</p>
<hr />
<div>[[Category:Web Server]]<br />
{{Note| If you are using xampp, there are different steps you need to take after installing. More info [https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_XAMPP#381 here] }}<br />
== Installation ==<br />
[[pacman|Install]] {{pkg|php-apache}}, {{pkg|php-intl}}, {{pkg|imagemagick}}, {{pkg|mysql}} (or {{pkg|postgresql}} and {{pkg|php-pgsql}}, see [[Postgresql]] for more details) and {{pkg|mediawiki}}, all available from the [[official repositories]].<br />
<br />
Instead of {{pkg|imagemagick}} you can install {{pkg|php-gd}}. Also instead of {{pkg|mysql}} you can install {{pkg|sqlite3}} or {{pkg|postgresql}}.<br />
<br />
==Configuration==<br />
<br />
Create {{ic|/etc/webapps/mediawiki/httpd-mediawiki.conf}} from the provided example {{ic|apache.example.conf}} in the same directory.<br />
<br />
*Add the following lines to {{ic|/etc/httpd/conf/httpd.conf}}<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
Include /etc/webapps/mediawiki/httpd-mediawiki.conf<br />
* Adjust the open_basedir in {{ic|httpd-mediawiki.conf}} to include the webapps directory.<br />
php_admin_value open_basedir "/usr/share/webapps/:/temp/:/usr/bin"<br />
<br />
Adjust permissions in {{ic|/usr/share/webapps/mediawiki/.htaccess}}<br />
<br />
Restart apache with:<br />
# rc.d restart httpd<br />
<br />
== Nginx ==<br />
To get MediaWiki working with Nginx, create the following file at {{ic|/etc/nginx/mediawiki.conf}}:<br />
<br />
location / {<br />
index index.php;<br />
try_files $uri @mediawiki;<br />
}<br />
location @mediawiki {<br />
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1$2 last;<br />
}<br />
location ~ \.php?$ {<br />
include fastcgi.conf;<br />
fastcgi_pass php;<br />
}<br />
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {<br />
try_files $uri /index.php;<br />
expires max;<br />
log_not_found off;<br />
}<br />
location ^~ /maintenance/ {<br />
return 403;<br />
}<br />
location ^~ /cache/ {<br />
deny all;<br />
}<br />
<br />
Ensure that {{ic|php-fpm}} is installed, and in your {{ic|/etc/nginx/nginx.conf}} file, ensure that you have an {{ic|upstream}} directive named {{ic|php}}, similar to this one:<br />
<br />
upstream php {<br />
server unix:/var/run/php-fpm/php-fpm.sock;<br />
}<br />
<br />
Include a server directive, similar to this, in your {{ic|/etc/nginx/nginx.conf}} file:<br />
<br />
server {<br />
listen 80;<br />
server_name mediawiki;<br />
root /usr/share/webapps/mediawiki;<br />
index index.php;<br />
include mediawiki.conf;<br />
}<br />
<br />
Finally, ensure that the {{ic|open_basedir}} directive in {{ic|/etc/php/php.ini}} includes {{ic|/usr/share/webapps}} and {{ic|/etc/webapps}}, or you might get "File not found" or "No input file specified" errors.<br />
<br />
== Tips ==<br />
=== Mathematics (texvc) ===<br />
<br />
Usually installing texvc package and enabling it in config are enough:<br />
$wgUseTeX = true;<br />
<br />
If you get problems, try to increase limits for shell commands:<br />
$wgMaxShellMemory = 8000000;<br />
$wgMaxShellFileSize = 1000000;<br />
$wgMaxShellTime = 300;<br />
<br />
=== Unicode ===<br />
<br />
Check that php, apache and mysql uses UTF-8. Otherwise you may face strange bugs because of encoding mismatch.</div>Jschuster