Instal memcached with php7
How can I install memcached from php.net and work it with php7+? I tried a couple of tutorials from other sites (I do not remember now) but it does not work. Can anyone help me to do this, I am quite new with Ubuntu and web development, so anything may help me.
php cache caching
add a comment |
How can I install memcached from php.net and work it with php7+? I tried a couple of tutorials from other sites (I do not remember now) but it does not work. Can anyone help me to do this, I am quite new with Ubuntu and web development, so anything may help me.
php cache caching
add a comment |
How can I install memcached from php.net and work it with php7+? I tried a couple of tutorials from other sites (I do not remember now) but it does not work. Can anyone help me to do this, I am quite new with Ubuntu and web development, so anything may help me.
php cache caching
How can I install memcached from php.net and work it with php7+? I tried a couple of tutorials from other sites (I do not remember now) but it does not work. Can anyone help me to do this, I am quite new with Ubuntu and web development, so anything may help me.
php cache caching
php cache caching
asked Oct 16 '16 at 14:47
googol8080googol8080
116
116
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
This is solution for you complete steps to install the memcached and php7 on Ubuntu OS:
First, You get and instal the PHP-7 and memcached:
sudo apt-get update
sudo apt-get install -y tmux curl wget
nginx
php7.0-fpm
php7.0-cli php7.0-curl php7.0-gd
php7.0-intl php7.0-mysql php-memcached
Then PHP7 is installed!
Seconds, If php-memcached was not installed, we can build it manually. (However, it's likely available to install via the php7.0-memcached package now).
If you need a newer version of the PHP-Memcached module, we can build it manually. Here's how:
sudo apt-get install -y php7.0-dev git pkg-config build-essential libmemcached-dev
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential
git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
sudo make install
Then we need to setup PHP (CLI and FPM) to use the memcached module. Edit /etc/php/mods-available/memcached.ini
, add:
; configuration for php memcached module
; priority=20
extension=memcached.so
Then enable it by including symlinks to that file in the FPM/CLI conf.d directories:
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/fpm/conf.d/20-memcached.ini
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/cli/conf.d/20-memcached.ini
Reload php-fpm to include the new changes
sudo service php7.0-fpm restart
And there we have it, PHP7 is installed, with Memcached support!
add a comment |
On Ubuntu 18.04, you need to get php-memcached from a nonstandard repo:
sudo apt-get install libmemcached-tools
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Then, if you hadn't done this yet:
sudo apt-get install php php-dev php-pear libapache2-mod-php
Finally:
sudo apt-get install php-memcached
service apache2 restart
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f837894%2finstal-memcached-with-php7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is solution for you complete steps to install the memcached and php7 on Ubuntu OS:
First, You get and instal the PHP-7 and memcached:
sudo apt-get update
sudo apt-get install -y tmux curl wget
nginx
php7.0-fpm
php7.0-cli php7.0-curl php7.0-gd
php7.0-intl php7.0-mysql php-memcached
Then PHP7 is installed!
Seconds, If php-memcached was not installed, we can build it manually. (However, it's likely available to install via the php7.0-memcached package now).
If you need a newer version of the PHP-Memcached module, we can build it manually. Here's how:
sudo apt-get install -y php7.0-dev git pkg-config build-essential libmemcached-dev
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential
git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
sudo make install
Then we need to setup PHP (CLI and FPM) to use the memcached module. Edit /etc/php/mods-available/memcached.ini
, add:
; configuration for php memcached module
; priority=20
extension=memcached.so
Then enable it by including symlinks to that file in the FPM/CLI conf.d directories:
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/fpm/conf.d/20-memcached.ini
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/cli/conf.d/20-memcached.ini
Reload php-fpm to include the new changes
sudo service php7.0-fpm restart
And there we have it, PHP7 is installed, with Memcached support!
add a comment |
This is solution for you complete steps to install the memcached and php7 on Ubuntu OS:
First, You get and instal the PHP-7 and memcached:
sudo apt-get update
sudo apt-get install -y tmux curl wget
nginx
php7.0-fpm
php7.0-cli php7.0-curl php7.0-gd
php7.0-intl php7.0-mysql php-memcached
Then PHP7 is installed!
Seconds, If php-memcached was not installed, we can build it manually. (However, it's likely available to install via the php7.0-memcached package now).
If you need a newer version of the PHP-Memcached module, we can build it manually. Here's how:
sudo apt-get install -y php7.0-dev git pkg-config build-essential libmemcached-dev
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential
git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
sudo make install
Then we need to setup PHP (CLI and FPM) to use the memcached module. Edit /etc/php/mods-available/memcached.ini
, add:
; configuration for php memcached module
; priority=20
extension=memcached.so
Then enable it by including symlinks to that file in the FPM/CLI conf.d directories:
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/fpm/conf.d/20-memcached.ini
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/cli/conf.d/20-memcached.ini
Reload php-fpm to include the new changes
sudo service php7.0-fpm restart
And there we have it, PHP7 is installed, with Memcached support!
add a comment |
This is solution for you complete steps to install the memcached and php7 on Ubuntu OS:
First, You get and instal the PHP-7 and memcached:
sudo apt-get update
sudo apt-get install -y tmux curl wget
nginx
php7.0-fpm
php7.0-cli php7.0-curl php7.0-gd
php7.0-intl php7.0-mysql php-memcached
Then PHP7 is installed!
Seconds, If php-memcached was not installed, we can build it manually. (However, it's likely available to install via the php7.0-memcached package now).
If you need a newer version of the PHP-Memcached module, we can build it manually. Here's how:
sudo apt-get install -y php7.0-dev git pkg-config build-essential libmemcached-dev
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential
git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
sudo make install
Then we need to setup PHP (CLI and FPM) to use the memcached module. Edit /etc/php/mods-available/memcached.ini
, add:
; configuration for php memcached module
; priority=20
extension=memcached.so
Then enable it by including symlinks to that file in the FPM/CLI conf.d directories:
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/fpm/conf.d/20-memcached.ini
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/cli/conf.d/20-memcached.ini
Reload php-fpm to include the new changes
sudo service php7.0-fpm restart
And there we have it, PHP7 is installed, with Memcached support!
This is solution for you complete steps to install the memcached and php7 on Ubuntu OS:
First, You get and instal the PHP-7 and memcached:
sudo apt-get update
sudo apt-get install -y tmux curl wget
nginx
php7.0-fpm
php7.0-cli php7.0-curl php7.0-gd
php7.0-intl php7.0-mysql php-memcached
Then PHP7 is installed!
Seconds, If php-memcached was not installed, we can build it manually. (However, it's likely available to install via the php7.0-memcached package now).
If you need a newer version of the PHP-Memcached module, we can build it manually. Here's how:
sudo apt-get install -y php7.0-dev git pkg-config build-essential libmemcached-dev
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential
git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
sudo make install
Then we need to setup PHP (CLI and FPM) to use the memcached module. Edit /etc/php/mods-available/memcached.ini
, add:
; configuration for php memcached module
; priority=20
extension=memcached.so
Then enable it by including symlinks to that file in the FPM/CLI conf.d directories:
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/fpm/conf.d/20-memcached.ini
sudo ln -s /etc/php/mods-available/memcached.ini /etc/php/7.0/cli/conf.d/20-memcached.ini
Reload php-fpm to include the new changes
sudo service php7.0-fpm restart
And there we have it, PHP7 is installed, with Memcached support!
answered Aug 4 '17 at 4:23
TannettoTannetto
39127
39127
add a comment |
add a comment |
On Ubuntu 18.04, you need to get php-memcached from a nonstandard repo:
sudo apt-get install libmemcached-tools
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Then, if you hadn't done this yet:
sudo apt-get install php php-dev php-pear libapache2-mod-php
Finally:
sudo apt-get install php-memcached
service apache2 restart
add a comment |
On Ubuntu 18.04, you need to get php-memcached from a nonstandard repo:
sudo apt-get install libmemcached-tools
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Then, if you hadn't done this yet:
sudo apt-get install php php-dev php-pear libapache2-mod-php
Finally:
sudo apt-get install php-memcached
service apache2 restart
add a comment |
On Ubuntu 18.04, you need to get php-memcached from a nonstandard repo:
sudo apt-get install libmemcached-tools
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Then, if you hadn't done this yet:
sudo apt-get install php php-dev php-pear libapache2-mod-php
Finally:
sudo apt-get install php-memcached
service apache2 restart
On Ubuntu 18.04, you need to get php-memcached from a nonstandard repo:
sudo apt-get install libmemcached-tools
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Then, if you hadn't done this yet:
sudo apt-get install php php-dev php-pear libapache2-mod-php
Finally:
sudo apt-get install php-memcached
service apache2 restart
answered 2 days ago
Camille GoudeseuneCamille Goudeseune
1569
1569
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f837894%2finstal-memcached-with-php7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown